-
Notifications
You must be signed in to change notification settings - Fork 303
Description
Is your feature request related to a problem? Please describe.
When updating definitions for objects such as views or functions, a new migration is required, which means we have to duplicate the definition to add the necessary modification.
Describe the solution you'd like
Have some repeatable migrations that are applied with each migration up command, something similar to Flyway's Repeatable Migrations
Let's say we have these files in the migrations folder
[timestamp1]_migration_1.sql
r_my_view_or_function.sql
Running migration up would apply migration_1 and then my_view_or_function (it can use current_timestamp as version).
We now add a new migration:
[timestamp1]_migration_1.sql
[timestamp2]_migration_2.sql
r_my_view_or_function.sql
Running migration up would skip migration_1, apply migration_2, and then re-apply my_view_or_function (with a different current_timestamp as version).
Describe alternatives you've considered
Manually executing r_my_view_or_function.sql after applying migrations by connecting to the database directly
Additional context
N/A