I'm using flyway with gradle, I've ran one of the migrations manually inside the database console, I want to run flyway, but tell it to ignore one specific migration version in between all the others. Can this be done ?
相关问题
- Flyway specific migration with csv files
- How to ignore placeholder expressions for Flyway?
- How to use flyway to migrate data from one DB to a
- Flyway not finding my sql migrations in db/migrati
- flyway exception, detected failed migration
相关文章
- Flyway not finding my sql migrations in db/migrati
- flyway exception, detected failed migration
- Caused by: org.flywaydb.core.api.FlywayException:
- Several app instances trying to migrate the same d
- Flyway output to SQL File
- Best practice: How to modify flyway migration scri
- Automatic generation of migration SQL for Flyway
- Spring Boot 2.1.0 with Flyway 4.2.0
Not Recommended But if you still want to :
1) Run flywayMigrate, let the migration fail.
2) Manually, update the flyway meta table(success column) for that specific version of migration.
3) Run flywayMigrate again.
4) Done, flyway will now start with the next version of migration.
You would have to hack it a bit to get it to work, so I don't recommend this approach, but it would work in a pinch.
I've only tested this with Maven, but I'm pretty sure it'd work with Gradle too.
Migrate up until the version before the one you applied manually
Insert a row for the script you applied
Repair the
schema_version
checksumApply the other migrations
The two
-D
properties there may not be necessary, depending on whether you got theinsert
correct or not. Flyway may disagree with your script description, for example, even if the checksum is now correct.