[open-ils-commits] [GIT] Evergreen ILS branch master updated. b6a5ab4ed4ea708ba0513578f7bc41d31a515b27
Evergreen Git
git at git.evergreen-ils.org
Fri Mar 8 09:59:37 EST 2019
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 b6a5ab4ed4ea708ba0513578f7bc41d31a515b27 (commit)
via 15b279a7db9c15838a64900bded47f8a4cf3be56 (commit)
from 4ab4869d498c48b4808c7ec15ae053b874259151 (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 b6a5ab4ed4ea708ba0513578f7bc41d31a515b27
Author: Bill Erickson <berickxx at gmail.com>
Date: Fri Mar 8 09:58:54 2019 -0500
LP1811689 Stamping upgrade - truncate simple rec
Signed-off-by: Bill Erickson <berickxx at gmail.com>
diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 2d37ee2382..5d4b323a0d 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -92,7 +92,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 ('1154', :eg_version); -- berick/mmorgan
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1155', :eg_version); -- berick/rogan
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.reporter-simple-rec-truncate.sql b/Open-ILS/src/sql/Pg/upgrade/1155.schema.reporter-simple-rec-truncate.sql
similarity index 89%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.schema.reporter-simple-rec-truncate.sql
rename to Open-ILS/src/sql/Pg/upgrade/1155.schema.reporter-simple-rec-truncate.sql
index b64b22c875..d44393107f 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.reporter-simple-rec-truncate.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/1155.schema.reporter-simple-rec-truncate.sql
@@ -1,6 +1,6 @@
BEGIN;
--- SELECT evergreen.upgrade_deps_block_check('TODO', :eg_version);
+SELECT evergreen.upgrade_deps_block_check('1155', :eg_version);
CREATE OR REPLACE FUNCTION reporter.enable_materialized_simple_record_trigger () RETURNS VOID AS $$
commit 15b279a7db9c15838a64900bded47f8a4cf3be56
Author: Bill Erickson <berickxx at gmail.com>
Date: Fri Feb 1 12:28:58 2019 -0500
LP1811689 TRUNCATE when rebuilding simple record
TRUNCATE reporter.materialized_simple_record for more efficient
rebuilding of the table.
Signed-off-by: Bill Erickson <berickxx at gmail.com>
Signed-off-by: Rogan Hamby <rogan.hamby at gmail.com>
diff --git a/Open-ILS/src/sql/Pg/reporter-schema.sql b/Open-ILS/src/sql/Pg/reporter-schema.sql
index 3dd0c394c0..8d0897d817 100644
--- a/Open-ILS/src/sql/Pg/reporter-schema.sql
+++ b/Open-ILS/src/sql/Pg/reporter-schema.sql
@@ -214,7 +214,7 @@ $$ LANGUAGE SQL;
CREATE OR REPLACE FUNCTION reporter.enable_materialized_simple_record_trigger () RETURNS VOID AS $$
- DELETE FROM reporter.materialized_simple_record;
+ TRUNCATE TABLE reporter.materialized_simple_record;
INSERT INTO reporter.materialized_simple_record
(id,fingerprint,quality,tcn_source,tcn_value,title,author,publisher,pubdate,isbn,issn)
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.reporter-simple-rec-truncate.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.reporter-simple-rec-truncate.sql
new file mode 100644
index 0000000000..b64b22c875
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.reporter-simple-rec-truncate.sql
@@ -0,0 +1,20 @@
+BEGIN;
+
+-- SELECT evergreen.upgrade_deps_block_check('TODO', :eg_version);
+
+CREATE OR REPLACE FUNCTION reporter.enable_materialized_simple_record_trigger () RETURNS VOID AS $$
+
+ TRUNCATE TABLE reporter.materialized_simple_record;
+
+ INSERT INTO reporter.materialized_simple_record
+ (id,fingerprint,quality,tcn_source,tcn_value,title,author,publisher,pubdate,isbn,issn)
+ SELECT DISTINCT ON (id) * FROM reporter.old_super_simple_record;
+
+ CREATE TRIGGER bbb_simple_rec_trigger
+ AFTER INSERT OR UPDATE OR DELETE ON biblio.record_entry
+ FOR EACH ROW EXECUTE PROCEDURE reporter.simple_rec_trigger();
+
+$$ LANGUAGE SQL;
+
+
+COMMIT;
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +-
Open-ILS/src/sql/Pg/reporter-schema.sql | 2 +-
...fresh.sql => 1155.schema.reporter-simple-rec-truncate.sql} | 11 ++++++-----
3 files changed, 8 insertions(+), 7 deletions(-)
copy Open-ILS/src/sql/Pg/upgrade/{0462.schema.no-truncate-during-bib-view-refresh.sql => 1155.schema.reporter-simple-rec-truncate.sql} (53%)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list