ragtime.strategy
Algorithms for managing conflicts between migrations applied to a database,
and migrations that we want to apply to the database.
apply-new
(apply-new applied migrations)
A strategy to apply any new migrations, irregardless of whether they come
before migrations already applied to the database.
ignore-future
(ignore-future applied migrations)
A strategy that raises an error if there are any conflicts between the
applied migrations and the defined migration list, unless the conflicts are
just future migrations.
This is useful for blue/green deployments where the new
version of the application has applied some migrations that the old version is not
aware of. With this strategy, the old version expects that some migrations may exists
that it is not aware of.
raise-error
(raise-error applied migrations)
A strategy that raises an error if there are any conflicts between the
applied migrations and the defined migration list. This is useful for
production use.
rebase
(rebase applied migrations)
A strategy that rollbacks the database to the first conflict, then applies
the successive migrations in order. This is useful when developing, but is
not suitable for production use.