Open humpfhumpf opened 6 days ago
Hi @humpfhumpf ,
In this case, you need to include escape character. The below configuration in a toml file works:
defaultSchema = "\"catalog\".\"schema\""
Hi @JasonLuo-Redgate , With:
"\"starburst_db\".\"demo_flyway\""
"flyway_history_demo_schema"
["demo_schema"]
I get these messages with flyway migrate
:
Creating schema """starburst_db"".""demo_flyway""" ...
Creating schema "demo_schema" ...
Creating Schema History table """starburst_db"".""demo_flyway"""."flyway_history_demo_schema" ...
[...]
DEBUG: Executing SQL: CREATE TABLE """starburst_db"".""demo_flyway"""."flyway_history_demo_schema" (
[...]
ERROR: Failed to execute operation in non-transactional context. Please restore backups and roll back database and code!
I am now wondering, if the trino plugin doesn't make some hard double-quoting... What do you thing about the line https://github.com/flyway/flyway/blob/main/flyway-core/src/main/java/org/flywaydb/core/internal/database/base/Schema.java#L221 ? It does hard double-quoting, no?
Some databases use extended schema name like "catalog"."schema" instead of simply "schema".
Currently on Flyway CLI, when
flyway.schemas
orflyway.defaultSchema
configuration keys are set with catalog.schema value, CLI uses "catalog.schema" (instead of "catalog"."schema").If I put "catalog"."schema" name in configuration, flyway CLI guess this erroneous schema: ""catalog"."schema""
One of the cause seems to be here: https://github.com/flyway/flyway/blob/main/flyway-core/src/main/java/org/flywaydb/core/internal/database/base/Schema.java#L221
Which version and edition of Flyway are you using?
10.17.1 Opensource edition.
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)
Main branch is also impacted: https://github.com/flyway/flyway/blob/main/flyway-core/src/main/java/org/flywaydb/core/internal/database/base/Schema.java#L221
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
CLI
Which database are you using? (Type & version)
Trino, but not releated to any specific database type.
Which operating system are you using?
Windows
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)
see above
What did you expect to see?
see above
What did you see instead?
see above