You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which version and edition of Flyway are you using?
8.0.5
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)
N/A (using latest)
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
Command-line
Which database are you using? (Type & version)
PostgreSQL 13
Which operating system are you using?
Windows and Linux
What did you do? (Please include the content causing the issue, any relevant configuration settings, the SQL statement(s) that failed (if any), and the command you ran)
Start with a PostgreSQL database with a public schema (i.e. the public schema is created BEFORE any FlyWay commands are executed, so the public schema is NOT created by FlyWay);
In flyway.conf, set the schemas property to "private" and "public" (i.e. have FlyWay manage the private and public schemas). NOTE, that while FlyWay is expected to manage BOTH schemas, FlyWay will be responsible for the creation ONLY for the private schema - teh public schema already exists;
After executing any number of migrations, clean the schemas by executing "flyway clean -outputType=json"
What did you expect to see?
I expected to see that ONLY the private schema is dropped while the public schema is ONLY cleaned. Instead, both schemas are dropped, as indicated by the command output:
Both schemas were dropped (even the schema which was NOT created by FlyWay):
I expected to see that ONLY the private schema is dropped while the public schema is ONLY cleaned. Instead, both schemas are dropped, as indicated by the command output:
NOTE: It looks like the problem is that there is a single flag for dropping schemas (i.e. the flag is NOT per schema) and the flag is set as long as at least one schema is created by FlyWay (see
HOWEVER, according to a comment in the sample conf file, ONLY schemas that were created by FlyWay are expected to be dropped (otherwise, they are ONLY cleaned). See:
Which version and edition of Flyway are you using?
8.0.5
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)
N/A (using latest)
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
Command-line
Which database are you using? (Type & version)
PostgreSQL 13
Which operating system are you using?
Windows and Linux
What did you do? (Please include the content causing the issue, any relevant configuration settings, the SQL statement(s) that failed (if any), and the command you ran)
What did you expect to see?
I expected to see that ONLY the private schema is dropped while the public schema is ONLY cleaned. Instead, both schemas are dropped, as indicated by the command output:
What did you see instead?
Both schemas were dropped (even the schema which was NOT created by FlyWay):
I expected to see that ONLY the private schema is dropped while the public schema is ONLY cleaned. Instead, both schemas are dropped, as indicated by the command output:
NOTE: It looks like the problem is that there is a single flag for dropping schemas (i.e. the flag is NOT per schema) and the flag is set as long as at least one schema is created by FlyWay (see
flyway/flyway-core/src/main/java/org/flywaydb/core/internal/command/DbClean.java
Line 83 in 599516b
HOWEVER, according to a comment in the sample conf file, ONLY schemas that were created by FlyWay are expected to be dropped (otherwise, they are ONLY cleaned). See:
flyway/flyway-commandline/src/main/assembly/flyway.conf
Line 83 in 599516b
The text was updated successfully, but these errors were encountered: