Skipping some upgrade bits on the test system
authorJeff Godin <jgodin@tadl.org>
Mon, 23 Jul 2012 13:47:29 +0000 (09:47 -0400)
committerJeff Godin <jgodin@tadl.org>
Mon, 23 Jul 2012 13:47:29 +0000 (09:47 -0400)
Commented out some bits which were either already present, or not
absolutely required and were taking too long to run on a test system.

Not all of these should be skipped for the "real" upgrade.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Open-ILS/src/sql/Pg/version-upgrade/2.0.4-2.0.5-upgrade-db.sql
Open-ILS/src/sql/Pg/version-upgrade/2.0.5-2.0.6-upgrade-db.sql
Open-ILS/src/sql/Pg/version-upgrade/2.0.6-2.0.7-upgrade-db.sql
Open-ILS/src/sql/Pg/version-upgrade/2.0.7-2.0.8-upgrade-db.sql
Open-ILS/src/sql/Pg/version-upgrade/2.1-2.2-upgrade-db.sql

index 94489b7..8ba6f6b 100644 (file)
@@ -22,6 +22,7 @@ use Unicode::Normalize 'normalize';
 return normalize($_[1],$_[0]); # reverse the params
 $func$ LANGUAGE PLPERLU;
 
+/* this trigger already present in tadl prod
 UPDATE metabib.facet_entry SET value = force_unicode_normal_form(value,'NFC');
 
 CREATE OR REPLACE FUNCTION facet_force_nfc() RETURNS TRIGGER AS $$
@@ -34,7 +35,7 @@ $$ LANGUAGE PLPGSQL;
 CREATE TRIGGER facet_force_nfc_tgr
        BEFORE UPDATE OR INSERT ON metabib.facet_entry
        FOR EACH ROW EXECUTE PROCEDURE facet_force_nfc();
-
+*/
 
 INSERT INTO config.upgrade_log (version) VALUES ('0506'); -- miker
 
index 614460b..a659f72 100644 (file)
@@ -268,7 +268,9 @@ BEGIN
 END;
 $F$ LANGUAGE PLPGSQL;
 
+/* trigger already present
 CREATE TRIGGER action_circulation_target_copy_trig AFTER INSERT OR UPDATE ON action.circulation FOR EACH ROW EXECUTE PROCEDURE evergreen.fake_fkey_tgr('target_copy');
+*/
 
 INSERT INTO config.upgrade_log (version) VALUES ('0516'); 
 
@@ -945,6 +947,7 @@ $func$ LANGUAGE PLPERLU;
 
 INSERT INTO config.upgrade_log (version) VALUES ('0529');
 
+/* already present in tadl prod
 INSERT INTO config.org_unit_setting_type 
 ( name, label, description, datatype ) VALUES 
 ( 'circ.user_merge.delete_addresses', 
@@ -968,5 +971,6 @@ INSERT INTO config.org_unit_setting_type
   'Mark barcode(s) of subordinate user(s) in a patron merge as inactive', 
   'bool'
 );
+*/
 
 COMMIT;
index 97d79dc..151a4cd 100644 (file)
@@ -7,9 +7,11 @@ INSERT INTO config.upgrade_log (version) VALUES ('0534'); --gmc
 
 INSERT INTO config.upgrade_log (version) VALUES ('0535'); --dbs
 
+/* already present in tadl prod
 CREATE INDEX authority_record_deleted_idx ON authority.record_entry(deleted) WHERE deleted IS FALSE OR deleted = false;
 
 CREATE INDEX authority_full_rec_subfield_a_idx ON authority.full_rec (value) WHERE subfield = 'a';
+*/
 
 INSERT INTO config.upgrade_log (version) VALUES ('0538'); -- senator
 
index 854a7df..08d10e3 100644 (file)
@@ -393,6 +393,7 @@ INSERT INTO config.global_flag (name, label, enabled)
 
 INSERT INTO config.upgrade_log (version) VALUES ('0582'); -- miker
 
+/* skip -- replaced later in 2.0-2.1 upgrade script anyway
 CREATE OR REPLACE VIEW action.all_circulation AS
     SELECT  id,usr_post_code, usr_home_ou, usr_profile, usr_birth_year, copy_call_number, copy_location,
         copy_owning_lib, copy_circ_lib, copy_bib_record, xact_start, xact_finish, target_copy,
@@ -415,7 +416,7 @@ CREATE OR REPLACE VIEW action.all_circulation AS
         JOIN actor.usr p ON (circ.usr = p.id)
         LEFT JOIN actor.usr_address a ON (p.mailing_address = a.id)
         LEFT JOIN actor.usr_address b ON (p.billing_address = b.id);
-
+*/
 
 INSERT INTO config.upgrade_log (version) VALUES ('0587'); -- dbs/berick
 
index f527d29..69bb9c2 100644 (file)
@@ -943,13 +943,13 @@ INSERT into config.org_unit_setting_type
 ( 'circ.holds.age_protect.active_date', 'Holds: Use Active Date for Age Protection', 'When calculating age protection rules use the active date instead of the creation date.', 'bool');
 
 -- Assume create date when item is in status we would update active date for anyway
-UPDATE asset.copy SET active_date = create_date WHERE status IN (SELECT id FROM config.copy_status WHERE copy_active = true);
+-- UPDATE asset.copy SET active_date = create_date WHERE status IN (SELECT id FROM config.copy_status WHERE copy_active = true);
 
 -- Assume create date for any item with circs
-UPDATE asset.copy SET active_date = create_date WHERE id IN (SELECT id FROM extend_reporter.full_circ_count WHERE circ_count > 0);
+-- UPDATE asset.copy SET active_date = create_date WHERE id IN (SELECT id FROM extend_reporter.full_circ_count WHERE circ_count > 0);
 
 -- Assume create date for status change time while we are at it. Because being created WAS a change in status.
-UPDATE asset.copy SET status_changed_time = create_date WHERE status_changed_time IS NULL;
+-- UPDATE asset.copy SET status_changed_time = create_date WHERE status_changed_time IS NULL;
 
 -- Evergreen DB patch 0564.data.delete_empty_volume.sql
 --
@@ -5978,6 +5978,7 @@ $$
 WHERE id = 14;
 
 
+/* tadl skip
 SELECT evergreen.upgrade_deps_block_check('0643', :eg_version);
 
 DO $$
@@ -5996,7 +5997,7 @@ BEGIN
     END LOOP;
 END;
 $$;
-
+*/
 
 
 SELECT evergreen.upgrade_deps_block_check('0644', :eg_version);
@@ -6616,12 +6617,12 @@ CREATE OR REPLACE VIEW action.all_circulation AS
         LEFT JOIN actor.usr_address b ON (p.billing_address = b.id);
 
 -- Update action.circulation with real copy_location numbers instead of all NULL
-DO $$BEGIN RAISE WARNING 'We are about to do an update on every row in action.circulation. This may take a while. %', timeofday(); END;$$;
-UPDATE action.circulation circ SET copy_location = ac.location FROM asset.copy ac WHERE ac.id = circ.target_copy;
+-- DO $$BEGIN RAISE WARNING 'We are about to do an update on every row in action.circulation. This may take a while. %', timeofday(); END;$$;
+-- UPDATE action.circulation circ SET copy_location = ac.location FROM asset.copy ac WHERE ac.id = circ.target_copy;
 
 -- Set not null/default on new column, re-enable triggers
 ALTER TABLE action.circulation
-    ALTER COLUMN copy_location SET NOT NULL,
+    -- tadl skip ALTER COLUMN copy_location SET NOT NULL,
     ALTER COLUMN copy_location SET DEFAULT 1,
     ENABLE TRIGGER ALL;
 
@@ -12417,6 +12418,9 @@ INSERT INTO permission.perm_list ( id, code, description )
         )
     );
 
+COMMIT;
+
+BEGIN;
 
 -- Evergreen DB patch 0716.coded_value_map_id_seq_fix.sql