[open-ils-commits] r17138 - trunk/Open-ILS/src/sql/Pg/upgrade (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Aug 9 10:37:22 EDT 2010
Author: dbs
Date: 2010-08-09 10:37:20 -0400 (Mon, 09 Aug 2010)
New Revision: 17138
Modified:
trunk/Open-ILS/src/sql/Pg/upgrade/0364.schema.call_number_normalization.sql
Log:
And let's create those new auditor columns first, before any changes ripple through the base table
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 14:35:16 UTC (rev 17137)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0364.schema.call_number_normalization.sql 2010-08-09 14:37:20 UTC (rev 17138)
@@ -7,6 +7,7 @@
name TEXT NOT NULL,
normalizer TEXT NOT NULL DEFAULT 'asset.normalize_generic'
);
+CREATE INDEX asset_call_number_label_sortkey ON asset.call_number(label_sortkey);
INSERT INTO asset.call_number_class (name, normalizer) VALUES
('Generic', 'asset.label_normalizer_generic'),
@@ -14,11 +15,10 @@
('Library of Congress (LC)', 'asset.label_normalizer_lc')
;
+ALTER TABLE auditor.asset_call_number_history ADD COLUMN label_class BIGINT;
+ALTER TABLE auditor.asset_call_number_history ADD COLUMN label_sortkey TEXT;
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;
-ALTER TABLE auditor.asset_call_number_history ADD COLUMN label_sortkey TEXT;
CREATE OR REPLACE FUNCTION asset.label_normalizer() RETURNS TRIGGER AS $func$
DECLARE
More information about the open-ils-commits
mailing list