View Issue Details

IDProjectCategoryView StatusLast Update
0006593SymmetricDSBugpublic2024-09-19 19:13
Reporterelong Assigned Toelong  
Prioritynormal 
Status assignedResolutionopen 
Product Version3.8.0 
Target Version3.15.9 
Summary0006593: DDL change cannot alter column to nullable on H2
DescriptionOn 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
Tagsddl/schema, dialect: h2

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2024-09-19 19:13 elong New Issue
2024-09-19 19:13 elong Status new => assigned
2024-09-19 19:13 elong Assigned To => elong
2024-09-19 19:13 elong Tag Attached: ddl/schema
2024-09-19 19:13 elong Tag Attached: dialect: h2