Issue 165 in flyway: Feature request - add support for always running sql files in a certain directory, before or after migrations

7 views
Skip to first unread message

fly...@googlecode.com

unread,
Sep 26, 2011, 10:32:17 AM9/26/11
to flywa...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

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!

fly...@googlecode.com

unread,
Sep 29, 2011, 6:47:08 AM9/29/11
to flywa...@googlegroups.com
Updates:
Labels: -Type-Defect Type-Enhancement

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.

fly...@googlecode.com

unread,
Oct 4, 2011, 5:32:43 PM10/4/11
to flywa...@googlegroups.com

Comment #2 on 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 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.

fly...@googlecode.com

unread,
Apr 21, 2012, 12:38:58 AM4/21/12
to flywa...@googlegroups.com

Comment #3 on issue 165 by axel.fontai...@gmail.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

Issue 207 has been merged into this issue.

fly...@googlecode.com

unread,
May 9, 2013, 12:56:45 PM5/9/13
to flywa...@googlegroups.com

Comment #7 on issue 165 by orbf...@gmail.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

This would be a very useful feature for me. I run an entire migration, and
then have to run a "populate" script by hand to import data from another
schema. I always have to do this at the end, so I could create a V99
script - but this means all my schemas would always be at V99.

The elegance of having a separate directory "before" and "after"
(especially after!) would be that this would run without affecting the
versioning.

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

fly...@googlecode.com

unread,
May 12, 2013, 1:46:45 AM5/12/13
to flywa...@googlegroups.com

Comment #8 on issue 165 by dev.bhas...@gmail.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

This definitely sounds like a desirable feature.

fly...@googlecode.com

unread,
Jun 25, 2013, 7:55:20 AM6/25/13
to flywa...@googlegroups.com
Updates:
Status: Migrated

Comment #9 on issue 165 by axel.fontai...@gmail.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

Migrated to GitHub: https://github.com/flyway/flyway/issues/80

To everyone who starred this issue: please leave a +1 comment on the linked
GitHub issue
Reply all
Reply to author
Forward
0 new messages