Skip to content
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

Allow passing custom initialization SQL for database connections #684

Closed
lokori opened this issue Jan 28, 2014 · 1 comment
Closed

Allow passing custom initialization SQL for database connections #684

lokori opened this issue Jan 28, 2014 · 1 comment

Comments

@lokori
Copy link
Contributor

@lokori lokori commented Jan 28, 2014

It is sometimes convenient to be able to run custom SQL statements when a database connection is acquired before the migrations run. In my case I want to set a value for a PostgreSQL session variable which is used by a trigger if the migration script contains insert or update statements.

Flyway actually contains the necessary functionality already. Flyway.setDataSource creates a DataSource implementation which has this option but access to it is a bit cumbersome at the moment.

@axelfontaine
Copy link
Contributor

@axelfontaine axelfontaine commented Feb 11, 2014

Thanks for the fix! I did some cleanup to remove the now unnecessary non-vararg method.

Cheers
Axel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants