Fix schema 27 upgrade for H2
On H2 we have to include "NOT NULL" because the column is part of the primary key, and the alter statement thinks we are trying to remove the NOT NULL constraint. Change-Id: I303126f5022d6325279c8dfddb0869c80911faf1 Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@@ -53,7 +53,7 @@ class Schema_27 extends SchemaVersion {
|
||||
stmt.execute("ALTER TABLE account_groups"
|
||||
+ " ALTER COLUMN name VARCHAR(255)");
|
||||
stmt.execute("ALTER TABLE account_group_names"
|
||||
+ " ALTER COLUMN name VARCHAR(255)");
|
||||
+ " ALTER COLUMN name VARCHAR(255) NOT NULL");
|
||||
|
||||
} else if (dialect instanceof DialectMySQL) {
|
||||
stmt.execute("ALTER TABLE account_groups MODIFY name VARCHAR(255)");
|
||||
|
Reference in New Issue
Block a user