mirror of
https://github.com/TECHNOFAB11/dbmate.git
synced 2026-02-02 09:25:07 +01:00
Document migration order (#160)
This commit is contained in:
parent
616c4fe442
commit
26f17d5141
1 changed files with 2 additions and 0 deletions
|
|
@ -205,6 +205,8 @@ Writing: ./db/schema.sql
|
|||
|
||||
> Note: `dbmate up` will create the database if it does not already exist (assuming the current user has permission to create databases). If you want to run migrations without creating the database, run `dbmate migrate`.
|
||||
|
||||
Pending migrations are always applied in numerical order. However, dbmate does not prevent migrations from being applied out of order if they are committed independently (for example: if a developer has been working on a branch for a long time, and commits a migration which has a lower version number than other already-applied migrations, dbmate will simply apply the pending migration). See [#159](https://github.com/amacneil/dbmate/issues/159) for a more detailed explanation.
|
||||
|
||||
### Rolling Back Migrations
|
||||
|
||||
By default, dbmate doesn't know how to roll back a migration. In development, it's often useful to be able to revert your database to a previous state. To accomplish this, implement the `migrate:down` section:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue