Comments
3 comments
-
comment removed
-
A possible work around is to add a callback beforeEachMigrate.sql containing `SET CURRENT_SCHEMA = CURRENT_USER`, but I would prefer if there where a way to declare the schema for the history table without affecting registers.
-
Hi @Lennart
Thank you for reaching out on the Redgate forums regarding your Flyway schema question.
I found this page, which might be relevant to your question, it is around the defining of schema for the history table.
https://documentation.red-gate.com/fd/table-184127544.html
By default, in single-schema mode, the schema history table is placed in the default schema for the connection provided by the datasource.
When the defaultSchema or schemas property is set, in multi-schema mode, the schema history table is placed in the specified default schema.
Add comment
Please sign in to leave a comment.
VALUES CURRENT_SCHEMA;
and when I run in 8.4.1, I get:
#> flyway-8.4.1 -defaultSchema=NYA_FLYWAY -schemas=DB2INST1,NYA_FLYWAY -table=FLYWAY_SCHEMA_HISTORY -driver=com.ibm.db2.jcc.DB2Driver -url=jdbc:db2://nya-01:50000/nya -user=db2inst1 -password=${passwd} -jarDirs=/home/lejo0004/. -locations="filesystem:/home/lejo0004/Project/db-legacy/nya/src/main/resources/db/migration" migrate
Is this deliberate and is there a way to declare the schema for the history table without affecting registers for the user running the migration?