Author: tchemit Date: 2012-03-02 14:42:51 +0100 (Fri, 02 Mar 2012) New Revision: 3155 Url: http://chorem.org/repositories/revision/pollen/3155 Log: fix migration scripts Modified: branches/pollen-1.2.6-struts2/pollen-persistence/src/main/java/org/chorem/pollen/entities/migration/PollenMigrationCallbackV1_2_6.java Modified: branches/pollen-1.2.6-struts2/pollen-persistence/src/main/java/org/chorem/pollen/entities/migration/PollenMigrationCallbackV1_2_6.java =================================================================== --- branches/pollen-1.2.6-struts2/pollen-persistence/src/main/java/org/chorem/pollen/entities/migration/PollenMigrationCallbackV1_2_6.java 2012-03-02 13:08:07 UTC (rev 3154) +++ branches/pollen-1.2.6-struts2/pollen-persistence/src/main/java/org/chorem/pollen/entities/migration/PollenMigrationCallbackV1_2_6.java 2012-03-02 13:42:51 UTC (rev 3155) @@ -186,6 +186,7 @@ queries.add("ALTER TABLE " + tableName + " DROP CONSTRAINT " + fk + ";"); queries.add("ALTER TABLE " + tableName + " DROP COLUMN " + oldColumn + ";"); queries.add("ALTER TABLE " + tableName + " ADD COLUMN " + newColum + " INT NOT NULL DEFAULT 0;"); + queries.add("ALTER TABLE " + tableName + " ALTER COLUMN " + newColum + " DROP NOT NULL;"); String updateRequest = "update " + tableName + " set " + newColum + " = %s where topiaid = '%s';"; for (Pair<String, String> pollByChoice : rowsToReplace) {
participants (1)
-
tchemit@users.chorem.org