0
votes

I am using flyway for a deployment and the tables built as a result of flyway are all fine. The issue I have is with the schema_version table. I am unable to query an individual column in the table. I am only able to perform a select *. The error message I am getting is:

10:35:49 [SELECT - 0 row(s), 0.000 secs] 1) [Error Code: -206, SQL State: 42703] DB2 SQL Error: SQLCODE=-206, SQLSTATE=42703, SQLERRMC=SCRIPT, DRIVER=4.13.127. 2) [Error Code: -727, SQL State: 56098] DB2 SQL Error: SQLCODE=-727, SQLSTATE=56098, SQLERRMC=2;-206;42703;SCRIPT, DRIVER=4.13.127

3
I can attach screenshots to demonstrateDave I
The error message tells you that there is no column called SCRIPT in your table. May be Flyway created the table with column names that are not uppercase?mustaccio
@mustaccio I am aware. Is there a way in flyway to make the schema version table with all upper case columnsDave I

3 Answers

0
votes

Try enclosing the column name in double quotes: select "SCRIPT" from flyway.schema_version

0
votes

This might help.

Flyway Schema table is designed to be in lower case.

You can change the table name using below config property.

flyway.table=SCHEMA_VERSION

For more details you can check this

https://flywaydb.org/documentation/faq#case-sensitive

0
votes

Try to make your query like this:

SELECT "version", "installed_on"  FROM "schema_version";