From e87fa40a514c63ae79c3078ec0bad1a7cd483150 Mon Sep 17 00:00:00 2001 From: dbs Date: Mon, 9 Aug 2010 13:48:45 +0000 Subject: [PATCH] Get the entries into asset.call_number_class before altering asset.call_number git-svn-id: svn://svn.open-ils.org/ILS/trunk@17135 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../sql/Pg/upgrade/0364.schema.call_number_normalization.sql | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Open-ILS/src/sql/Pg/upgrade/0364.schema.call_number_normalization.sql b/Open-ILS/src/sql/Pg/upgrade/0364.schema.call_number_normalization.sql index 5d3fe3391..94ef45990 100644 --- a/Open-ILS/src/sql/Pg/upgrade/0364.schema.call_number_normalization.sql +++ b/Open-ILS/src/sql/Pg/upgrade/0364.schema.call_number_normalization.sql @@ -8,6 +8,12 @@ CREATE TABLE asset.call_number_class ( normalizer TEXT NOT NULL DEFAULT 'asset.normalize_generic' ); +INSERT INTO asset.call_number_class (name, normalizer) VALUES + ('Generic', 'asset.label_normalizer_generic'), + ('Dewey (DDC)', 'asset.label_normalizer_dewey'), + ('Library of Congress (LC)', 'asset.label_normalizer_lc') +; + 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); @@ -99,10 +105,4 @@ CREATE OR REPLACE FUNCTION asset.label_normalizer_lc(TEXT) RETURNS TEXT AS $func $func$ LANGUAGE PLPERLU; -INSERT INTO asset.call_number_class (name, normalizer) VALUES - ('Generic', 'asset.label_normalizer_generic'), - ('Dewey (DDC)', 'asset.label_normalizer_dewey'), - ('Library of Congress (LC)', 'asset.label_normalizer_lc') -; - COMMIT; -- 2.11.0