View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006593 | SymmetricDS | Bug | public | 2024-09-19 19:13 | 2024-11-13 20:31 |
Reporter | elong | Assigned To | elong | ||
Priority | normal | ||||
Status | closed | Resolution | fixed | ||
Product Version | 3.8.0 | ||||
Target Version | 3.15.10 | Fixed in Version | 3.15.10 | ||
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 | ||||
SymmetricDS: 3.15 9eb8fb01 2024-10-09 12:49:34 Details Diff |
0006593: DDL change cannot alter column to nullable on H2 |
Affected Issues 0006593 |
|
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/DatabaseInfo.java | Diff File | ||
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/ase/AseDdlBuilder.java | Diff File | ||
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/h2/H2DdlBuilder.java | Diff File | ||
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/mysql/MySqlDdlBuilder.java | Diff File | ||
mod - symmetric-jdbc/src/test/java/org/jumpmind/db/AbstractDdlTypesTest.java | Diff File | ||
mod - symmetric-jdbc/src/test/java/org/jumpmind/db/DatabasePlatformTest.java | Diff File | ||
add - symmetric-jdbc/src/test/java/org/jumpmind/db/platform/ase/AseDdlTypesTest.java | Diff File | ||
mod - symmetric-jdbc/src/test/java/org/jumpmind/db/platform/h2/H2DdlTypesTest.java | Diff File | ||
add - symmetric-jdbc/src/test/java/org/jumpmind/db/platform/mysql/MySqlDdlTypesTest.java | Diff File | ||
mod - symmetric-jdbc/src/test/java/org/jumpmind/db/platform/postgresql/PostgreSqlDdlTypesTest.java | Diff File |
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 | |
2024-10-01 18:37 | admin | Target Version | 3.15.9 => 3.15.10 |
2024-10-09 12:54 | elong | Status | assigned => resolved |
2024-10-09 12:54 | elong | Resolution | open => fixed |
2024-10-09 12:54 | elong | Fixed in Version | => 3.15.10 |
2024-10-09 13:00 | admin | Changeset attached | => SymmetricDS 3.15 9eb8fb01 |
2024-11-13 20:31 | pbelov | Status | resolved => closed |