-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Harry Bragg
committed
Aug 9, 2018
1 parent
a8d1fbc
commit f4e38da
Showing
2 changed files
with
31 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ Sprout is a tool to help Dump, Truncate and Seed development data into your data | |
![](https://78.media.tumblr.com/534425eb11706448af8ce5838629f76d/tumblr_inline_n9t8gdzC7p1qzjzhu.gif) | ||
|
||
1. Seed sql data from local files | ||
1. Dump data from mysql tables | ||
1. Dump data from mysql tables | ||
1. Performs actions in parallel | ||
1. Handle multiple groups of seed data (for example, `static`, `core`, `testing`) | ||
|
||
|
@@ -23,73 +23,73 @@ Sprout is a tool to help Dump, Truncate and Seed development data into your data | |
Via Composer | ||
|
||
```bash | ||
~$ composer require graze/sprout | ||
composer require graze/sprout | ||
``` | ||
|
||
Via docker | ||
|
||
```bash | ||
`$ docker run -v [volumes] --rm graze/sprout [command] | ||
docker run -v [volumes] --rm graze/sprout [command] | ||
``` | ||
|
||
## Usage | ||
|
||
### Quick Start | ||
|
||
```bash | ||
~$ # Dump all tables you are interested in | ||
~$ sprout dump --config=config/sprout.yml --group=core a_schema:table_1,table_2 ... | ||
# Dump all tables you are interested in | ||
sprout dump --config=config/sprout.yml --group=core a_schema:table_1,table_2 ... | ||
|
||
~$ # Store the data in your repository of choice | ||
~$ git add /seed/data/* | ||
# Store the data in your repository of choice | ||
git add /seed/data/* | ||
|
||
~$ # Seed the data from your seed data | ||
~$ sprout seed --config=config/sprout.yml --group=core | ||
# Seed the data from your seed data | ||
sprout seed --config=config/sprout.yml --group=core | ||
``` | ||
|
||
### Seeding | ||
|
||
```bash | ||
~$ sprout seed [--config=<path>] [--group=<group>] [--chop] [<schema>[:<table>,...]] ... | ||
sprout seed [--config=<path>] [--group=<group>] [--chop] [<schema>[:<table>,...]] ... | ||
|
||
~$ sprout seed --config=config/sprout.yml the_schema | ||
~$ sprout seed --config=config/sprout.yml --chop the_schema | ||
sprout seed --config=config/sprout.yml the_schema | ||
sprout seed --config=config/sprout.yml --chop the_schema | ||
|
||
~$ sprout seed --config=config/sprout.yml the_schema:country | ||
~$ sprout seed --config=config/sprout.yml --chop the_schema:country other_schema:planets | ||
sprout seed --config=config/sprout.yml the_schema:country | ||
sprout seed --config=config/sprout.yml --chop the_schema:country other_schema:planets | ||
|
||
~$ sprout seed --config=config/sprout.yml --group=core | ||
~$ sprout seed --config=config/sprout.yml --group=core the_schema | ||
~$ sprout seed --config=config/sprout.yml --chop --group=extra | ||
sprout seed --config=config/sprout.yml --group=core | ||
sprout seed --config=config/sprout.yml --group=core the_schema | ||
sprout seed --config=config/sprout.yml --chop --group=extra | ||
``` | ||
### Truncating the data from all the tables in a schema | ||
```bash | ||
~$ sprout chop [--config=<path>] [--group=<group>] [<schema>[:<table>,...]] ... | ||
sprout chop [--config=<path>] [--group=<group>] [<schema>[:<table>,...]] ... | ||
|
||
~$ sprout chop --config=config/sprout.yml the_schema | ||
~$ sprout chop --config=config/sprout.yml the_schema:country | ||
sprout chop --config=config/sprout.yml the_schema | ||
sprout chop --config=config/sprout.yml the_schema:country | ||
|
||
~$ sprout chop --config=config/sprout.yml --group=core the_schema | ||
~$ sprout chop --config=config/sprout.yml --group=extra the_schema:country | ||
sprout chop --config=config/sprout.yml --group=core the_schema | ||
sprout chop --config=config/sprout.yml --group=extra the_schema:country | ||
``` | ||
### Dumping the data from all tables in a schema | ||
```bash | ||
~$ sprout dump [--config=<path>] [--group=<group>] [<schema>[:<table>,...]] ... | ||
sprout dump [--config=<path>] [--group=<group>] [<schema>[:<table>,...]] ... | ||
|
||
~$ sprout dump --config=config/sprout.yml the_schema | ||
~$ sprout dump --config=config/sprout.yml the_schema:country | ||
sprout dump --config=config/sprout.yml the_schema | ||
sprout dump --config=config/sprout.yml the_schema:country | ||
|
||
~$ sprout dump --config=config/sprout.yml --group=core | ||
~$ sprout dump --config=config/sprout.yml --group=core the_schema:country | ||
sprout dump --config=config/sprout.yml --group=core | ||
sprout dump --config=config/sprout.yml --group=core the_schema:country | ||
``` | ||
## Testing | ||
```shell | ||
```bash | ||
make build test | ||
``` | ||
|
@@ -99,7 +99,8 @@ Please see [CONTRIBUTING](CONTRIBUTING.md) for details. | |
## Security | ||
If you discover any security related issues, please email [email protected] instead of using the issue tracker. | ||
If you discover any security related issues, please email [email protected] | ||
instead of using the issue tracker. | ||
## Credits | ||
|