[open-ils-commits] [GIT] Evergreen ILS branch master updated. 2a77078c43bec6aab61c75a03f4801fe735cff58
Evergreen Git
git at git.evergreen-ils.org
Wed Oct 26 18:38:42 EDT 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, master has been updated
via 2a77078c43bec6aab61c75a03f4801fe735cff58 (commit)
via b00d34fc683698c37201b0966abaeafcabb75c23 (commit)
from d11c07ae59a6a34215aab2dfd76b785eb9c2e388 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 2a77078c43bec6aab61c75a03f4801fe735cff58
Author: Thomas Berezansky <tsbere at mvlc.org>
Date: Wed Oct 26 18:35:04 2011 -0400
Stamping Upgrade script to populate authority.simple_heading
Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 02ba712..9234024 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -86,7 +86,7 @@ CREATE TRIGGER no_overlapping_deps
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,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.populate_authority_simple_heading.sql b/Open-ILS/src/sql/Pg/upgrade/0643.data.populate_authority_simple_heading.sql
similarity index 87%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.data.populate_authority_simple_heading.sql
rename to Open-ILS/src/sql/Pg/upgrade/0643.data.populate_authority_simple_heading.sql
index c42cb85..cd6ecb0 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.populate_authority_simple_heading.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/0643.data.populate_authority_simple_heading.sql
@@ -1,6 +1,6 @@
BEGIN;
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+SELECT evergreen.upgrade_deps_block_check('0643', :eg_version);
DO $$
DECLARE x TEXT;
commit b00d34fc683698c37201b0966abaeafcabb75c23
Author: Mike Rylander <mrylander at gmail.com>
Date: Wed Oct 26 13:05:17 2011 -0400
Upgrade script to populate authority.simple_heading
Signed-off-by: Mike Rylander <mrylander at gmail.com>
Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.populate_authority_simple_heading.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.populate_authority_simple_heading.sql
new file mode 100644
index 0000000..c42cb85
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.populate_authority_simple_heading.sql
@@ -0,0 +1,23 @@
+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;
+
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +-
...0643.data.populate_authority_simple_heading.sql | 23 ++++++++++++++++++++
2 files changed, 24 insertions(+), 1 deletions(-)
create mode 100644 Open-ILS/src/sql/Pg/upgrade/0643.data.populate_authority_simple_heading.sql
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list