Should be able to delete repeatable migration scripts
See original GitHub issueWhich version and edition of Flyway are you using?
6.0.6
If this is not the latest version, can you reproduce the issue with the latest one as well?
n/a
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
Command-line
Which database are you using (type & version)?
Oracle 18.3
Which operating system are you using?
Windows 10
What did you do?
I created a repeatable migration containing a single stored procedure. At a later date I wanted to delete the stored procedure and the associated repeatable migration.
I tried deleting the repeatable migration script, but this resulted in Flyway considering the repeatable migration to be Missing with no way to indicate that it was deliberately removed.
The only other option I could see was to empty the repeatable migration script but keep the file.
Neither of these two options are great solutions because either I have to maintain an empty, redundant repeatable migration script or I constantly get Missing entries in my Flyway info queries.
What did you expect to see?
I would expect to be able to delete repeatable migration scripts completely from my Flyway project. The flyway_schema_history table could either have all entries for that repeatable migration removed, or a new entry could be created marked as something other than Missing (e.g. Deleted) so that history is maintained.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:6 (2 by maintainers)
Top Related StackOverflow Question
We’re thought about this, and our proposal is:
Unfortunately, to implement this feature properly we probably need to update the schema history table. This is a significant change which can only really be made in a major version bump (i.e V7). So it’ll have to wait until then.
+1 (& in a perfect world it would also be able to handle DBobject Renames (ie. DEL+ADD) in a clean fashion)