What is Flyway baseline feature good for? [closed]

Baselining a database at version V1_0__baseline.sql, for example, instructs Flyway to only apply migration scripts that have been created after V1_0. It does this by inserting a migration entry in the SCHEMA_VERSION table used by Flyway. When you run a migration, available migration scripts will only be applied if their version is higher than the baseline version.

Example

You wish to use Flyway on a production and development database. You create a schema only dump of production. This will be the first migration script applied when you create a new empty database using Flyway.

However, because your existing production and development machines are already on this version, you don't want to apply this initial script. To prevent this, you create a SCHEMA_VERSION table and insert "1_0" into the table to instruct Flyway that the database is already at 1_0. Instead of manually creating this table and inserting a row via SQL, you can run the Flyway baseline command.

Then, a few weeks later, there is another database that you haven't brought onto Flyway, but have still been applying update scripts to (maybe you didn't have time). When you bring this database onto Flyway, you may need to baseline it at V3_0 or some other version.