1
votes

The Flyway documentation contains this simple example of a repeatable migration:

-- R__Blue_cars.sql

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

However, this migration presumably depends on a previous fixed-version migration that creates the cars table (let's call it V1__Create_Cars_Table.sql).

How can I ensure the repeatable migration is run after this fixed-version migration when deploying to a new database? Or does Flyway apply the fixed-version migrations first and the repeatable ones after that?

1

1 Answers

1
votes

Versioned migrations are applied before repeatable ones.