Skip to content
Advertisement

Flyway Repeatable Script Throwing Table Does Not Exist Error

I am currently trying to trim down my versioned scripts into one baseline script (we don’t pay for flyway so is a pain). So I deleted my schema and attempted to run my one big script that contains everything I had. I exported the DDL out of my DBeaver client. However when starting my applications I am getting this error:

JavaScript

I beleive this error is because the repeatable script is running before the versioning, where as the versioning script is what creates all of the tables. It is my understanding that flyway runs the repeatable scripts last. Is there some sort of property I am missing or something? Here is my directory structure:

JavaScript

Please let me know if you need anymore information from my here is my flyway properties

JavaScript

Advertisement

Answer

Looking at your scripts, your V script is named incorrectly

The naming convention is documented here

In particular, the double underscore needs to appear after the version number in the V script, so the correct name would be V01__baseline.sql

Repeatable migrations run after Versioned migrations, so this should fix the problem once the Versioned migration is properly detected

Advertisement