RP-Kit / RPKit

RPKit plugin suite
Apache License 2.0
21 stars 12 forks source link

Flyway doesn't play especially well when multiple plugins use the same database #514

Closed renbinden closed 3 years ago

renbinden commented 3 years ago

If multiple plugins attempt to use the same database, flyway will complain that there are already things existing in the database. We need to call baselineOnMigrate(true) when creating flyway instances so that it is chill with what's already there.

renbinden commented 3 years ago

baselineOnMigrate doesn't seem to work either, as each plugin after the first sets the database as its baseline but does not apply migrations

renbinden commented 3 years ago

baselineOnMigrate in conjunction with baselineVersion 0 does seem to work as the first migration gets applied after the baseline.

renbinden commented 3 years ago

validateOnMigrate should probably be disabled as well as the schema may change outside of the migrations of any one plugin.