BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0642', :eg_version); -- berick/senator
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0643', :eg_version); -- miker/tsbere
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
--- /dev/null
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('0643', :eg_version);
+
+DO $$
+DECLARE x TEXT;
+BEGIN
+
+ FOR x IN
+ SELECT marc
+ FROM authority.record_entry
+ WHERE id > 0
+ AND NOT deleted
+ AND id NOT IN (SELECT DISTINCT record FROM authority.simple_heading)
+ LOOP
+ INSERT INTO authority.simple_heading (record,atag,value,sort_value)
+ SELECT record, atag, value, sort_value FROM authority.simple_heading_set(x);
+ END LOOP;
+END;
+$$;
+
+COMMIT;
+
+++ /dev/null
-BEGIN;
-
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
-
-DO $$
-DECLARE x TEXT;
-BEGIN
-
- FOR x IN
- SELECT marc
- FROM authority.record_entry
- WHERE id > 0
- AND NOT deleted
- AND id NOT IN (SELECT DISTINCT record FROM authority.simple_heading)
- LOOP
- INSERT INTO authority.simple_heading (record,atag,value,sort_value)
- SELECT record, atag, value, sort_value FROM authority.simple_heading_set(x);
- END LOOP;
-END;
-$$;
-
-COMMIT;
-