[open-ils-commits] r17136 - trunk/Open-ILS/src/sql/Pg/upgrade (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Aug 9 10:33:55 EDT 2010


Author: dbs
Date: 2010-08-09 10:33:52 -0400 (Mon, 09 Aug 2010)
New Revision: 17136

Modified:
   trunk/Open-ILS/src/sql/Pg/upgrade/0364.schema.call_number_normalization.sql
Log:
Avoid the NOT NULL problem on the auditor table by not creating the constraint in the first place

The auditor schemas will be different for a from-scratch DB vs an upgraded database,
but just like the would-be iPhone purchaser says, "I don't care."


Modified: trunk/Open-ILS/src/sql/Pg/upgrade/0364.schema.call_number_normalization.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0364.schema.call_number_normalization.sql	2010-08-09 13:48:45 UTC (rev 17135)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0364.schema.call_number_normalization.sql	2010-08-09 14:33:52 UTC (rev 17136)
@@ -17,7 +17,7 @@
 ALTER TABLE asset.call_number ADD COLUMN label_class BIGINT DEFAULT 1 NOT NULL REFERENCES asset.call_number_class(id) DEFERRABLE INITIALLY DEFERRED;
 ALTER TABLE asset.call_number ADD COLUMN label_sortkey TEXT;
 CREATE INDEX asset_call_number_label_sortkey ON asset.call_number(label_sortkey);
-ALTER TABLE auditor.asset_call_number_history ADD COLUMN label_class BIGINT NOT NULL;
+ALTER TABLE auditor.asset_call_number_history ADD COLUMN label_class BIGINT;
 ALTER TABLE auditor.asset_call_number_history ADD COLUMN label_sortkey TEXT;
 
 CREATE OR REPLACE FUNCTION asset.label_normalizer() RETURNS TRIGGER AS $func$



More information about the open-ils-commits mailing list