New issue 165 by micha...@utest.com: Feature request - add support for
always running sql files in a certain directory, before or after migrations
http://code.google.com/p/flyway/issues/detail?id=165
Hi,
I would propose a new feature that would allow configuring flyway to run a
certain sql file or directory of sql files before and/or after the
migrations. Our use case is that some of our metadata is kept in a single
master sql file instead of through updates. The other use case I can see
for this is for some databases running pre or post migration database
maintenance tasks that are related to doing migrations (e.g. PostgreSQL
vacuum command)
I realize that this might be a somewhat niche feature, so feel free to
shoot this down if you don't agree.
Btw, awesome product!
Comment #1 on issue 165 by axel.fontaine.business: Feature request - add
support for always running sql files in a certain directory, before or
after migrations
http://code.google.com/p/flyway/issues/detail?id=165
Hi Michael,
Thank you very much for your feedback! Highly appreciated and always makes
me happy to read this :-)
I've answered a similar question on StackOverflow:
http://stackoverflow.com/questions/7219584/pre-and-post-migration-scripts-for-flyway
I will add this to the FAQ.
As always, nothing is set in stone, but my current stance on this is what I
wrote on StackOverflow.
Cheers,
Axel
P.S.: As a workaround you could look into either pre- and post-migration
stored procedures that do the required work and that you could call with
one line. Another alternative might be to always include the same
placeholder that would get expanded to whatever you need.
Hi Axel,
Thank you for your response. If you'd like to clean your open issues list
you can close this issue :-)
FYI, the work around that I did was that I added my own Java process that
did what I needed to and added running it to the .sh file before calling
Flyway.
Issue 207 has been merged into this issue.