I set up a bunch of repeatable migrations for my project to discard (and recreate) some frequently modified database views. The package structure looks something like this:
src/main/resources
|-db
|-R__pets_amphibians_view.sql
|-R__pets_birds_view.sql
|-R__pets_mammals_view.sql
|-R__pets_reptiles_view.sql
|-...
|-<versioned-migrations>
Now, what I would like to do is split the view R__pets_mammals_view.sqlinto two more specific views: for example. R__pets_mammals_dogs_view.sqland R_pets_mammals_rodents_view.sql, respectively. This will also rename / delete the source file R_pets_mammals_view.sql.
What I would like to know is, can I do this without messing up my version control of the circuit (possibly killing any hosted environments in the process)? Unfortunately, I could not find the answer to this question in the Flyway docs.
PS: I understand that it is not recommended to rename migrations carried by the version after they have been deployed for something outside the local environment. However, since recurring migrations can be changed at will (and since they were completed last), I am not sure if they really are βcountedβ in this context.
source
share