You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by sn...@apache.org on 2007/01/10 15:34:42 UTC
svn commit: r494826 - /incubator/roller/trunk/metadata/database/control.vm
Author: snoopdave
Date: Wed Jan 10 06:34:42 2007
New Revision: 494826
URL: http://svn.apache.org/viewvc?view=rev&rev=494826
Log:
Correct way to drop NOT NULL constraint from an ID column in PostgreSQL
Modified:
incubator/roller/trunk/metadata/database/control.vm
Modified: incubator/roller/trunk/metadata/database/control.vm
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/metadata/database/control.vm?view=diff&rev=494826&r1=494825&r2=494826
==============================================================================
--- incubator/roller/trunk/metadata/database/control.vm (original)
+++ incubator/roller/trunk/metadata/database/control.vm Wed Jan 10 06:34:42 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")