Want to deploy your JVM, Node.js and Go apps effortlessly to AWS? Try our service Boxfuse

Repeatable migrations

Repeatable migrations do not have a version. Instead they are (re-)applied every time their checksum changes.

This is very useful for managing database objects whose definition can then simply be maintained in a single file in version control.

Within a single migration run, repeatable migrations are always applied last, after all pending versioned migrations have been executed. Repeatable migrations are applied in the order of their description.

It is your responsibility to ensure the same repeatable migration can be applied multiple times. This usually involves making use of CREATE OR REPLACE clauses in your DDL statements.

Usages

  • (Re-)creating views/procedures/functions/packages/...
  • Bulk reference data reinserts

Example

R__Blue_cars.sql

CREATE OR REPLACE VIEW blue_cars AS SELECT id, license_plate FROM cars WHERE color='blue';

SQL-based migrations