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:
Shawn O. Pearce
2010-02-01 00:40:35 -08:00
parent f234bb8781
commit afd3c9fa73

View File

@@ -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)");