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
Output to sql file instead of commiting against the DB #87
Comments
From axel.fontaine.business@gmail.com on March 18, 2013 17:13:10 thanks for your suggestion! This is the current state of affairs: http://stackoverflow.com/questions/15447276/previewing-the-sql-statements-before-migration-using-flyway Cheers |
From sylvain....@gmail.com on March 18, 2013 19:32:43 |
+1 |
2 similar comments
+1 |
+1 |
+1 |
1 similar comment
+1 |
any news about this? |
+1 |
I'd love to have this feature as well. |
is this still on the roadmap somewhere? |
+1 |
2 similar comments
+1 |
+1 |
+1. |
+1 This is also relevant when you have a lot of migrations. Running 100+ migrations to run an integration test is just too slow. Flyway should be able to check the current version of the db to be updated and then combine the remaining migrations to run at once in single transaction. This of course might get tricky if you are using also programmatic migrations. Maybe sneaking in to the jdbc driver what sql clauses are getting executed and grab them. Or some other solution that is not this hackish. This would also allow proper reporting features of the migrations. |
I just wanted to give you a heads up that this issue is still on the roadmap. The reason it hasn't been prioritized higher than it was, is simply that other features were more relevant and that as a general rule bugs get fixed before new features. P.S.: If this feature is an urgent need for your organisation, you do also have to option to sponsor its development to get it done much sooner: http://flywaydb.org/support/sponsor.html |
+1 |
3 similar comments
+1 |
+1 |
+1 |
+1 |
1 similar comment
+1 |
+42 |
Hey everyone with a +1, I could use some help validating my implementation of "Dry Run". Did I miss anything? |
I would be happy to test it, but so far having difficulties to build it with or without your pull request. |
@cleverdeveloper - that was my biggest challenge when changing the code, here's how to build by skipping tests: mvn install -P-CommercialDBTest -P-CommandlinePlatformAssemblies -DskipTests=true Once built, the version will be 0-SNAPSHOT if I recall correctly... |
I am in the process of trying it out, but I wonder if it does output to file as it says in the title or this would be a next step to implement? |
You know what, I didn't implement the fix to this issue exactly... interesting. I found another issue which was closed as a duplicate of this issue and I guess I sort of just implemented the other one. This quite simply runs a "dry run" (using transactions) against a database to test upgrades before they happen. I guess maybe I should open a new issue that's distinct from this one (or reopen the other one) |
+1 |
+1 |
2 similar comments
+1 |
+1 |
+1 |
3 similar comments
+1 |
+1 |
+1 |
this issue is a show-stopper for using flyway in production environments |
+1 |
2 similar comments
+1 |
+1 |
Maybe using log4jdbc or one of its more recent forks?. You'd need a copy of the staging/production database though (at least its schema and flyway tables...) |
Original author: sylvain....@gmail.com (March 18, 2013 05:59:16)
HI,
We're just starting to use flyway in our project and so far it looks really good. It's gonna help us a lot automatically upgrade all of our different environments.
One thing that would be nice is way to combine all or specific sql versions into one sql file. We would use this because we can't tell our client's IT department (big client) to use flyway for upgrading the prod database and we obviously don't have access to that database.
Currently the only way we can get the database upgraded is by sending them an SQL file (which they run on their stage before prod).
In theory we could manually combine all the relevant files ourselves but that could be a bit cumbersome and error-prone. Also things like placeholders would need to be replaced manually (search & replace but still) with the proper value, again error-prone.
We use maven so a new goal should do it.
That said thanks for the great work!
Original issue: http://code.google.com/p/flyway/issues/detail?id=452
The text was updated successfully, but these errors were encountered: