roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r494825 - /incubator/roller/branches/roller_3.1/metadata/database/control.vm
Date Wed, 10 Jan 2007 14:34:18 GMT
Author: snoopdave
Date: Wed Jan 10 06:34:17 2007
New Revision: 494825

URL: http://svn.apache.org/viewvc?view=rev&rev=494825
Log:
Correct way to drop NOT NULL constraint from an ID column in PostgreSQL

Modified:
    incubator/roller/branches/roller_3.1/metadata/database/control.vm

Modified: incubator/roller/branches/roller_3.1/metadata/database/control.vm
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.1/metadata/database/control.vm?view=diff&rev=494825&r1=494824&r2=494825
==============================================================================
--- incubator/roller/branches/roller_3.1/metadata/database/control.vm (original)
+++ incubator/roller/branches/roller_3.1/metadata/database/control.vm Wed Jan 10 06:34:17
2007
@@ -49,7 +49,8 @@
     alter table $table drop primary key;
     alter table $table modify id varchar(48) null;
 #elseif ($DBTYPE == "POSTGRESQL")
-    alter table $table alter column drop not null;
+    alter table $table drop constraint "${table}_pkey";
+    alter table $table  alter column id drop not null;
 #elseif ($DBTYPE == "HSQLDB")
     alter table $table alter column id varchar(48) null;
 #elseif ($DBTYPE == "DERBY" || $DBTYPE == "DB2")



Mime
View raw message