State-based approach

Model name:

State-based dev and state-based deployment

Model description:

The source of truth of the dev DB state is the schema model, which is used as the "desired state" for both the purposes of sharing changes within the team and as a source for deployment.

The deployment script is generated at deployment time by Flyway's comparison engine. Note that there are complex changes that cannot be inferred by a comparison engine, such as applying NOT NULL columns without a DEFAULT to tables that contain data, and other changes that require data to be moved or transformed.

The state-based deployment model is suitable for

  1. Development teams who don't employ an automated pipeline
  2. Organizations who do employ an automated pipeline, but do not expect to make "complex" updates to their database that would require a manually-crafted migration script regularly. 
Organizations who employ an automated pipeline who find themselves encountering increasingly complex migrations should transition to the "state-based dev, migrations deployment" model.

Required editions

Flyway CommunityFlyway TeamsFlyway Enterprise
Authoring migrations

N/A

Not required as schema model is the source of deployments

Not required as schema model is the source of deployments

Sharing changes in dedicated development databasesN/AChanges shared using schema modelChanges shared using schema model
Database CI/CD

N/A

Not supported

Flyway checks available
Database DeploymentN/AManual state-based deployments allowedAutomated state-based deployments allowed

Didn't find what you were looking for?