mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
doc: update readme document for migration
This commit is contained in:
parent
c38564dcc7
commit
1118453b96
|
@ -562,6 +562,14 @@ Then run the following command to compile the migration files into go files:
|
|||
make migrations
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```shell
|
||||
rockhopper compile --config rockhopper_mysql.yaml --output pkg/migrations/mysql
|
||||
rockhopper compile --config rockhopper_sqlite.yaml --output pkg/migrations/sqlite3
|
||||
git add -v pkg/migrations && git commit -m "compile and update migration package" pkg/migrations || true
|
||||
```
|
||||
|
||||
|
||||
If you want to override the DSN and the Driver defined in the YAML config file, you can add some env vars in your dotenv file like this:
|
||||
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
-- +up
|
||||
-- +begin
|
||||
ALTER TABLE trades CHANGE fee_currency fee_currency varchar(10) NOT NULL;
|
||||
-- +end
|
||||
|
||||
-- +down
|
||||
-- +begin
|
||||
ALTER TABLE trades CHANGE fee_currency fee_currency varchar(4) NOT NULL;
|
||||
-- +end
|
|
@ -0,0 +1,8 @@
|
|||
-- +up
|
||||
-- +begin
|
||||
-- +end
|
||||
|
||||
-- +down
|
||||
|
||||
-- +begin
|
||||
-- +end
|
Loading…
Reference in New Issue
Block a user