View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006593 | SymmetricDS | Bug | public | 2024-09-19 19:13 | 2024-09-19 19:13 |
Reporter | elong | Assigned To | elong | ||
Priority | normal | ||||
Status | assigned | Resolution | open | ||
Product Version | 3.8.0 | ||||
Target Version | 3.15.9 | ||||
Summary | 0006593: DDL change cannot alter column to nullable on H2 | ||||
Description | On H2, a column whose nullable constraint is "not null" will not change to "null" from a DDL change. It will run an alter for the column, but expects that nullable is the default. H2 expects an explicit "null" option to be added to the alter statement. This does NOT change the constraint: ALTER TABLE "NULLTEST" ALTER COLUMN "NUM" INTEGER; This DOES change constraint: ALTER TABLE "NULLTEST" ALTER COLUMN "NUM" INTEGER NULL; | ||||
Steps To Reproduce | - create table nulltest (id integer primary key, num integer not null); - import a DDL change: <database xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="dbexport" encoding="UTF-8"> <table name="nulltest"> <column name="id" primaryKey="true" primaryKeySeq="1" required="true" type="INTEGER" size="10"> <platform-column name="mysql" type="INT" size="10"/> </column> <column name="num" type="INTEGER" size="10" required="false"> <platform-column name="mysql" type="INT" size="10"/> </column> </table> </database> - It will write SQL of: ALTER TABLE "NULLTEST" ALTER COLUMN "NUM" INTEGER; - The nullability won't change, it needs to have "NULL" on the end of the alter | ||||
Tags | ddl/schema, dialect: h2 | ||||