mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-10-24 15:55:55 +00:00
#701 - DB Migration - incorrect alter column DDL when removing not null constraint (Postgres specific)
This commit is contained in:
@@ -13,6 +13,7 @@ public class PostgresDdl extends PlatformDdl {
|
||||
this.dropTableCascade = " cascade";
|
||||
this.columnSetType = "type ";
|
||||
this.alterTableIfExists = "if exists ";
|
||||
this.columnSetNull = "drop not null";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -103,7 +103,7 @@ public class PlatformDdl_AlterColumnTest {
|
||||
assertEquals("alter table mytab alter column acol set null", sql);
|
||||
|
||||
sql = pgDdl.alterColumnNotnull("mytab", "acol", false);
|
||||
assertEquals("alter table mytab alter column acol set null", sql);
|
||||
assertEquals("alter table mytab alter column acol drop not null", sql);
|
||||
|
||||
sql = oraDdl.alterColumnNotnull("mytab", "acol", false);
|
||||
assertEquals("alter table mytab modify acol null", sql);
|
||||
|
||||
Reference in New Issue
Block a user