-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Support versioned scripts AFTER repeatables #2610
Comments
If I understand your scenario correctly, you'd like to:
Then, for your next deployment:
One approach could be to include the function definition and execution in the same repeatable migration. When you change the function, the entire script, including the function execution, will be re-run.
Perhaps it's undesirable to have the function definition and execution in one migration. Note that for Flyway 6.2 we're working on functionality to force repeatable migrations to run, even when unchanged (#1453). This will allow you to define a repeatable migration which simply executes the function. You can then decide whether to execute it upon migrate. I assume the Ultimately I suppose this a script dependency and ordering problem. We've encountered a few instances of this (e.g. #2541 (comment)). We're still thinking of a good way to solve the general problem. Is this of any help to you? |
It is similar to the extended info provided in #2541 , but I think my solution is much simpler than specifying execution order based on input. |
Fair enough that none of the proposed approaches are satisfactory. We'll keep this feature request open to see if it gets more support. Are you able to use any of the workarounds, or are you completely blocked by this issue? |
I'm currently using workaround 4 (change the function using flyway, then run it manually) - so I'm not blocked. Since I only have to do it seldom I don't want to invest any efforts in any of the alternatives. |
General problem captured here #2698 |
@MikielAgutu I understand that If only flyway would have supported versioned upgrades after repeatables... sigh. |
I would like to be able to run post-repeatable one time scripts (or versioned upgrades).
My scenario is simple - I have a table filled by a function. If the function changes and upon my decision I want to refill the table. The function is created as part of repeatables - hence cannot be referenced in an upgrade script before it is changed.
I know there are many workaround, but none of them is perfect:
Basically would have been nice to add a script which would run ONCE (versioned) AFTER the repeatables are done.
Whether they affect the schema version or not - makes little difference to me (but they probably should).
The text was updated successfully, but these errors were encountered: