adding lines to deal with "wide character" issue
authorChris Sharp <csharp@georgialibraries.org>
Wed, 7 Dec 2011 21:00:28 +0000 (16:00 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Wed, 7 Dec 2011 21:00:28 +0000 (16:00 -0500)
Open-ILS/src/sql/Pg/pines-pre-1.6.1-2.1-upgrade.sql

index 8cf1fb3..e8f3adf 100644 (file)
@@ -190,12 +190,25 @@ COMMIT;
 
 -- we need to tell Evergreen that every record we have in the system is a Unicode record:
 
--- disable triggers on biblio.record_entry:
+-- disable triggers on biblio.record_entry and authority.record_entry:
 
+ALTER TABLE biblio.record_entry DISABLE TRIGGER ALL;
+ALTER TABLE authority.record_entry DISABLE TRIGGER ALL;
 
+BEGIN;
 UPDATE biblio.record_entry
     SET marc = regexp_replace(marc, E'(<leader>.{9}).', E'\\1a');
+UPDATE authority.record_entry
+    SET marc = regexp_replace(marc, E'(<leader>.{9}).', E'\\1a');
+COMMIT;
+
+-- re-enable triggers
+ALTER TABLE biblio.record_entry ENABLE TRIGGER ALL;
+ALTER TABLE authority.record_entry ENABLE TRIGGER ALL;
 
+-- except for one for each table that was disabled before we started
+ALTER TABLE biblio.record_entry DISABLE TRIGGER _replication_denyaccess;
+ALTER TABLE authority.record_entry DISABLE TRIGGER _replication_denyaccess;
 
 -- These are restored by the post-upgrade PINES sql script.