I am using flyway for the first time. I tried to use it in my java swing desktop application. I tried to use it in my project that have existing database. It shows an error
Found non-empty schema(s)
schema_name
without schema history table! Use baseline() or set baselineOnMigrate to true to initialize the schema history table.
I tried to read some documentation but I can't get simple comparison between the both. Please help me to find the difference and which one I can use in this situation. I am using Java API of flyway.
baseline()
is a method you can call on Flyway. You can invoke it from command line, for example:
flyway baseline
On the other hand, baselineOnMigrate
is a setting which you can set int Flyway configuration (if you're using SpringBoot it's application.properties
):
flyway.baselineOnMigrate = true
It means "if schema is non-empty and user didn't call flyway baseline
explicitly, call it implicitly now"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With