You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have several old changesets which executed on H2 and mySQL without issue but there are change sets which declare a column type to be bigint(20). This parameter is deprecated and unused in modern versions of mySQL and Liquibase correctly ignores the parameter when executing against H2, but Liquibase generates invalid SQL against Postgres, which does not support the parameter at all.
This change set is executed by Spring Data Liquibase when starting up a Spring Boot application. It executes successfully against H2 1.4.200 and mySQL 8.0.30-commercial. Against a Postgres 14.5.0 instance running in a Docker container on my local machine, it generates an error
Actual Behavior
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [org/springframework/boot/autoconfigure/liquibase/LiquibaseAutoConfiguration$LiquibaseConfiguration.class]: Invocation of init method failed; nested exception is liquibase.exception.LiquibaseException: liquibase.exception.MigrationFailedException: Migration failed for change set db/changelog/1.0/create-tables-1.0.yml::create-revision-info-table::fraferna:
Reason: liquibase.exception.DatabaseException: ERROR: syntax error at or near "("
Position: 102 [Failed SQL: (0) CREATE TABLE vrr01dev.revinfo (id INTEGER GENERATED BY DEFAULT AS IDENTITY NOT NULL, timestamp BIGINT(20), CONSTRAINT revinfo_pkey PRIMARY KEY (id))]
Expected/Desired Behavior
I would expect Liquibase to generate a statement with timestamp BIGINT rather than including the invalid parameter to the column type on Postgres.
Screenshots (if appropriate)
If applicable, add screenshots to help explain your problem.
Additional Context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Environment
Liquibase Version: 4.9.1
Liquibase Integration & Version: maven
Liquibase Extension(s) & Version: liquiibase-core 4.9.1
Database Vendor & Version: PostgreSQL 14.5.0
Operating System Type & Version: Mac OS 13.1
Infrastructure Type/Provider: n/a
Description
We have several old changesets which executed on H2 and mySQL without issue but there are change sets which declare a column type to be
bigint(20)
. This parameter is deprecated and unused in modern versions of mySQL and Liquibase correctly ignores the parameter when executing against H2, but Liquibase generates invalid SQL against Postgres, which does not support the parameter at all.Steps To Reproduce
This change set is executed by Spring Data Liquibase when starting up a Spring Boot application. It executes successfully against H2 1.4.200 and mySQL 8.0.30-commercial. Against a Postgres 14.5.0 instance running in a Docker container on my local machine, it generates an error
Actual Behavior
Expected/Desired Behavior
I would expect Liquibase to generate a statement with
timestamp BIGINT
rather than including the invalid parameter to the column type on Postgres.Screenshots (if appropriate)
If applicable, add screenshots to help explain your problem.
Additional Context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: