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 $$
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
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');
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',
'Mark barcode(s) of subordinate user(s) in a patron merge as inactive',
'bool'
);
+*/
COMMIT;
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
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,
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
( '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
--
WHERE id = 14;
+/* tadl skip
SELECT evergreen.upgrade_deps_block_check('0643', :eg_version);
DO $$
END LOOP;
END;
$$;
-
+*/
SELECT evergreen.upgrade_deps_block_check('0644', :eg_version);
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;
)
);
+COMMIT;
+
+BEGIN;
-- Evergreen DB patch 0716.coded_value_map_id_seq_fix.sql