Skip to content

Problem when I use jooq-meta-extensions-liquibase and composite primary key #17590

Open
@night1ightning

Description

@night1ightning

Your question

That extension work well, but when it try to make composite primary key it's broken.
Error tell me col1 must be not null, but in postgres it's work.

Plugin usage h2 and has another behavior

For example
        <addPrimaryKey tableName="some_table"
                       columnNames="col1, co2"
                       constraintName="pk_some_key"/>

Can I skip this primary key in pulugin property?
Or what I can try to do

        <dependency>
          <groupId>org.jooq</groupId>
          <artifactId>jooq-meta-extensions-liquibase</artifactId>
          <version>3.19.15</version>
        </dependency>


            <plugin>
                <groupId>org.jooq</groupId>
                <artifactId>jooq-codegen-maven</artifactId>
                <version>3.19.15</version>

                <executions>
                    <execution>
                        <id>jooq-codegen</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>

                <configuration>
                    <generator>
                        <database>
                            <name>
                                org.jooq.meta.extensions.liquibase.LiquibaseDatabase</name>
                            <properties>

                                <property>
                                    <key>rootPath</key>
                                    <value>${basedir}/src/main/resources</value>
                                </property>

                                <property>
                                    <key>scripts</key>
                                    <value>database_deposits_changelog.xml</value>
                                </property>
                            </properties>
                        </database>
                    </generator>
                </configuration>
            </plugin>

P.S. Thank you for very much!

jOOQ Version

free version 3.19.15

Database product and version

PostgreSQL 13

Java Version

17

JDBC / R2DBC driver name and version (include name if unofficial driver)

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions