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
Postgres smallint syntax error #1015
Comments
It looks like an I am trying to test a fix locally before pushing it. |
PR opened, built and tested locally. Ready to be merged. |
Built a new PR with a better fix by adding it to the list of unmodifiable types. |
FWIW this changeset doesn't repro the issue: <createTable tableName="serial_test">
<column name="id" type="smallint">
<constraints nullable="false" primaryKey="true"/>
</column>
</createTable> produces CREATE TABLE public.serial_test (id SMALLINT NOT NULL, CONSTRAINT SERIAL_TEST_PKEY PRIMARY KEY (id)); in LiquiBase 3.8.8. |
Hi @jong82 Thanks for writing up this issue. This has been fixed a different way than the pull request 1027. Is it acceptable to close this issue as having been fixed? |
I am unable to reproduce this issue with Liquibase 4.6.1. I created a table in Postgres like this:
I ran
Looks like it was resolved with this PR: #1046 |
Describe the bug
Creating a
smallint
column in postgres incorrectly specifies the length assmallint(5)
which generates a syntax error. It just needs to besmallint
.To Reproduce
Steps to reproduce the behavior:
liquibase generateChangeLog
against a database that has a smallint column.liquibase update
against an empty database to recreate the schema.Expected behavior
Create a smallint without error
Screenshots
Unexpected error running Liquibase: ERROR: syntax error at or near "("
Position: 268 [Failed SQL: (0) CREATE TABLE public.xyz (.....SMALLINT(5)....)
Additional context
This was run inside the published docker container although that should be irrelevant for this error.
The text was updated successfully, but these errors were encountered: