Because Graphile Migrate tracks which migrations it has ran and runs remaining
migrations, you must not put your existing database schema as the first
migration otherwise you production database might be wiped (or it just won't
work) when Graphile Migrate attempts to apply it. Instead you must ensure all
databases (development, staging, production, etc.) are at the same state before
running any migrations, and then the Graphile Migrate migrations will be applied
on top of this initial state.
If you want to change selection, open document below and click on "Move attachment"
GitHub - graphile/migrate: Opinionated SQL-powered productive roll-forward migration tool for PostgreSQL. select 4; $$ language sql stable; Using Migrate with an existing database You can use Graphile Migrate to manage the migrations for your existing system, but the process is slightly different. <span>Because Graphile Migrate tracks which migrations it has ran and runs remaining migrations, you must not put your existing database schema as the first migration otherwise you production database might be wiped (or it just won't work) when Graphile Migrate attempts to apply it. Instead you must ensure all databases (development, staging, production, etc.) are at the same state before running any migrations, and then the Graphile Migrate migrations will be applied on top of this initial state. Storing the initial state Though you could hand-roll the initial state if you prefer, we generally advise that you take a schema-only dump of your existing (production) database schema Summary
status | not read | | reprioritisations | |
---|
last reprioritisation on | | | suggested re-reading day | |
---|
started reading on | | | finished reading on | |
---|
Details