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
The code in PostgreSQLPlatform::isNumericType (on version 3.1.5 it is in PostgreSQL94Platform) only detects INTEGER or BIGINT as numeric type, the smallint type is missing here.
Current behaviour
I want to change the column of a table from SERIAL to SMALLSERIAL, but the generated DDL contains a DROP DEFAULT, which is a bad idea on serial types
ALTERTABLE table ALTER column TYPE SMALLINT;
ALTERTABLE table ALTER column DROP DEFAULT;
When changing from SERIAL to BIGSERIAL the DROP DEFAULT is not generated. This should be done for SMALLSERIAL as well.
Working bigint:
ALTER TABLE "table" ALTER "column" TYPE BIGINT;
Not working smallint:
ALTER TABLE "table" ALTER "column" TYPE SMALLINT;
ALTER TABLE "table" ALTER "column" DROP DEFAULT;
Expected behaviour
Working bigint:
ALTER TABLE "table" ALTER "column" TYPE BIGINT;
Working smallint:
ALTER TABLE "table" ALTER "column" TYPE SMALLINT;
The text was updated successfully, but these errors were encountered:
Bug Report
Summary
The code in
PostgreSQLPlatform::isNumericType
(on version 3.1.5 it is in PostgreSQL94Platform) only detects INTEGER or BIGINT as numeric type, the smallint type is missing here.Current behaviour
I want to change the column of a table from SERIAL to SMALLSERIAL, but the generated DDL contains a DROP DEFAULT, which is a bad idea on serial types
When changing from SERIAL to BIGSERIAL the DROP DEFAULT is not generated. This should be done for SMALLSERIAL as well.
How to reproduce
gives
Expected behaviour
The text was updated successfully, but these errors were encountered: