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

Dry-run file contains statements with invalid syntax #2280

Closed
asamonov opened this issue Jan 25, 2019 · 1 comment
Closed

Dry-run file contains statements with invalid syntax #2280

asamonov opened this issue Jan 25, 2019 · 1 comment

Comments

@asamonov
Copy link

@asamonov asamonov commented Jan 25, 2019

Which version and edition of Flyway are you using?

Pro 5.2.4

If this is not the latest version, can you reproduce the issue with the latest one as well?

(Many bugs are fixed in newer releases and upgrading will often resolve the issue)

Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)

Java API

Which database are you using (type & version)?

PostgeSQL 9.6.8

Which operating system are you using?

Linux,Windows

What did you do?

(Please include the content causing the issue, any relevant configuration settings, the SQL statement that failed (if relevant) and the command you ran.)

  1. Enable dry run mode (I use FlywayConfigurationCustomizer and call FluentConfiguration.dryRunOutput)
  2. Execute migration command
What did you expect to see?

Dry run ready to execute via psql

What did you see instead?

See below, note SELECT set_config('search_path', ?, false); line - this is not a valid syntax - ? is not expected.

---====================================
-- Flyway Dry Run (2019-01-25 19:57:24)
---====================================

SET ROLE 'postgres';
SET ROLE 'postgres';
SET ROLE 'postgres';

-- Executing: validate (with callbacks)
------------------------------------------------------------------------------------------
SET ROLE 'postgres';

-- Executing: migrate (with callbacks)
------------------------------------------------------------------------------------------
SET ROLE 'postgres';
SELECT set_config('search_path', ?, false);
@asamonov asamonov changed the title Dry-run file contains invalid syntax (PostgreSQL) Dry-run file contains statements with invalid syntax (PostgreSQL) Jan 25, 2019
@axelfontaine axelfontaine added this to the Flyway 6.0.0 milestone Jan 26, 2019
@axelfontaine axelfontaine changed the title Dry-run file contains statements with invalid syntax (PostgreSQL) Dry-run file contains statements with invalid syntax Jan 26, 2019
axelfontaine pushed a commit to flyway/flywaydb.org that referenced this issue Feb 8, 2019
@axelfontaine
Copy link
Contributor

@axelfontaine axelfontaine commented Feb 8, 2019

Thanks for the detailed report and analysis. This has now been fixed.

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

Successfully merging a pull request may close this issue.

None yet
2 participants