You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
A simpler solution/workaround would be to extend migrations up to always execute some SQL file (if present) in the migrations directory (matching a filename or a prefix), similar to seed.sql and the start or db reset commands
Great suggestion! 👍 To build on it, a post-migration hook for auto-running r_ files after migration up could keep the definitions updated without duplicating. This would streamline updates to views/functions and keep migrations cleaner!
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 MigrationsLet's say we have these files in the
migrations
folderRunning
migration up
would applymigration_1
and thenmy_view_or_function
(it can usecurrent_timestamp
as version).We now add a new migration:
Running
migration up
would skipmigration_1
, applymigration_2
, and then re-applymy_view_or_function
(with a differentcurrent_timestamp
as version).Describe alternatives you've considered
Manually executing
r_my_view_or_function.sql
after applying migrations by connecting to the database directlyAdditional context
N/A
The text was updated successfully, but these errors were encountered: