Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry Bragg committed Aug 9, 2018
1 parent a8d1fbc commit f4e38da
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 30 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md → LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2017 Nature Delivered Ltd.
Copyright (c) 2018 Nature Delivered Ltd.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
59 changes: 30 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`)

Expand All @@ -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
```
Expand All @@ -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
Expand Down

0 comments on commit f4e38da

Please sign in to comment.