I have a table defined in a liquibase script with a column named "value":
- column:
name: value
type: VARCHAR
constraints:
- nullable: false
dbms is postgresql
When running the JOOQ codegen with the maven plugin, it runs the liquibase script and I get the following error:
Syntax error in SQL statement "CREATE TABLE PUBLIC.TABLE_NAME (ID BIGINT AUTO_INCREMENT NOT NULL, ... , VALUE[*] VARCHAR NOT NULL)"; expected "identifier";
If I change the column name from "value" to anything else, it works. With JOOQ up to version 3.15, it works.
Any clue on how to handle this? I'd rather not change the name, I have multiple tables with a column named "value" so it's a quite big refactor, and naming wise I feel it's the most appropriate name for what it represents.
Solution
This is already fixed in the newer versions of liquibase, so you can manually specify which LB version to use in the jOOQ codegen:
<plugin>
<groupId>org.jooq</groupId>
<artifactId>jooq-codegen-maven</artifactId>
<version>${jooq.version}</version>
<dependencies>
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<version>${liquibase.version}</version>
</dependency>
...
</plugin>