Avoid the NOT NULL problem on the auditor table by not creating the constraint in...
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 9 Aug 2010 14:33:52 +0000 (14:33 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 9 Aug 2010 14:33:52 +0000 (14:33 +0000)
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."

git-svn-id: svn://svn.open-ils.org/ILS/trunk@17136 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Pg/upgrade/0364.schema.call_number_normalization.sql

index 94ef459..f2f1077 100644 (file)
@@ -17,7 +17,7 @@ INSERT INTO asset.call_number_class (name, normalizer) VALUES
 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$