flyway-9.21.2 updates CURRENT_SCHEMA in Db2

LennartLennart Posts: 3 New member
edited August 30, 2023 12:10PM in Flyway (General Discussion)
I upgraded to flyway-9.21.2 and a migration that replaces an external function written in Java fails because db2 can not locate the jar file for the implementation. This works in 8.4.1 and I think I isolated the error down to that CURRENT_SCHEMA is different. Created a dummy migration like:

VALUES CURRENT_SCHEMA;

deliberate cause error


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

+----------+
| 1        |
+----------+
| DB2INST1 |
+----------+
...

#> flyway-9.21.2 -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

+------------+
| 1          |
+------------+
| NYA_FLYWAY |
+------------+
...

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? 

Tagged:

Answers

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file