Combined state and migrations approach
Published 08 August 2022
Model name: | State-based development, migrations deployment | ||
---|---|---|---|
Model description: | The source of truth for the development database is the schema model, which is used as the "desired state" for the purpose of sharing changes with other developers. Migration scripts are the source of truth for deployments. This decouples the sharing of changes within a team with the deployment process, and means that deployment ordering doesn't have to align with when the migration scripts happen to be created. This model is recommended for Flyway Teams and Flyway Enterprise users who want full control over their deployments in their CI/CD pipelines. | ||
Edition | Flyway Community | Flyway Teams | Flyway Enterprise |
Authoring migrations | Not supported | Self-author migration scripts | Auto-generated migration scripts |
Sharing changes | Not supported | Developers update their dev DBs from the version controlled schema model* | Developers update their dev DBs from the version controlled schema model* |
Database CI/CD | Not supported | Dry run script generated for pre-deployment review/approval | + changes report, drift report, static analysis report |
Database Deployment | Not supported | Apply migration scripts | Apply migration scripts |
* Complex changes, for example those that require data motion (and therefore can't be inferred from the schema model) must be applied to dev environments manually.