Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BOOLEAN with precision doesn't work anymore with H2 database #4227

Closed
2 tasks done
sfrevel opened this issue May 8, 2023 · 1 comment · Fixed by #4228
Closed
2 tasks done

BOOLEAN with precision doesn't work anymore with H2 database #4227

sfrevel opened this issue May 8, 2023 · 1 comment · Fixed by #4228
Labels

Comments

@sfrevel
Copy link
Contributor

sfrevel commented May 8, 2023

Search first

  • I searched and no similar issues were found

Description

I have the following column definition from an historical changeset. Don't ask me why there is a precision ...

<column name="COLUMNNAME" type="BOOLEAN(1)">
    <constraints nullable="false"/>
</column>

Which gives me the following Error with liquibase 4.21.1

Syntax error in SQL statement "CREATE TABLE TABELNAME (COLUMNNAME BOOLEAN[*](1) NOT NULL)"; expected "ARRAY, INVISIBLE, VISIBLE, NOT NULL, NULL, AS, DEFAULT, GENERATED, ON UPDATE, NOT NULL, NULL, AUTO_INCREMENT, DEFAULT ON NULL, NULL_TO_DEFAULT, SEQUENCE, SELECTIVITY, COMMENT, CONSTRAINT, COMMENT, PRIMARY KEY, UNIQUE, NOT NULL, NULL, CHECK, REFERENCES, AUTO_INCREMENT, ,, )"

Because formally I struggled with this Bug #3300 and an older Liquibase version I think there has to be a similar handling for the boolean datatype.

Steps To Reproduce

Define a column like this in a changeset

<column name="COLUMNNAME" type="BOOLEAN(1)">
    <constraints nullable="false"/>
</column>

Expected/Desired Behavior

Column with BOOLEAN(x) is correctly translated.

Liquibase Version

4.21.1

Database Vendor & Version

H2 2.1.214

Liquibase Integration

CLI, maven

Liquibase Extensions

No response

OS and/or Infrastructure Type/Provider

MacOS Ventura 13.3.1

Additional Context

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR (Thank you!)
@MalloD12
Copy link
Contributor

Removed needs_guidance label, since @sfrevel already provides a PR for this issue. Thank you for that, @sfrevel!

filipelautert added a commit that referenced this issue Jun 28, 2023
#4227 fix for BOOLEAN with precision like BOOLEAN(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants