[open-ils-commits] ***SPAM*** [GIT] Evergreen ILS branch rel_2_6 updated. 87306cdcd5c126a484f680b3d3b87106f6054477
Evergreen Git
git at git.evergreen-ils.org
Tue Dec 16 15:03:26 EST 2014
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, rel_2_6 has been updated
via 87306cdcd5c126a484f680b3d3b87106f6054477 (commit)
via 01d34ef839600f585afc9051d4bf4849106e3dd3 (commit)
from 4a9471981693af428fa59c7996d8418fc11d7ea1 (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 87306cdcd5c126a484f680b3d3b87106f6054477
Author: Ben Shum <bshum at biblio.org>
Date: Tue Dec 16 15:01:53 2014 -0500
LP#1400376: Stamping upgrade script for fix to metabib.record_attr
Signed-off-by: Ben Shum <bshum at biblio.org>
diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index c60c5f6..a62ee63 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -91,7 +91,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 ('0899', :eg_version); -- dbwells/kmlussier/bshum
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0900', :eg_version); -- miker/bshum
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.no-null-record_attrs.sql b/Open-ILS/src/sql/Pg/upgrade/0900.schema.no-null-record_attrs.sql
similarity index 77%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.schema.no-null-record_attrs.sql
rename to Open-ILS/src/sql/Pg/upgrade/0900.schema.no-null-record_attrs.sql
index ee7f305..9ed7c72 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.no-null-record_attrs.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/0900.schema.no-null-record_attrs.sql
@@ -1,5 +1,7 @@
BEGIN;
+SELECT evergreen.upgrade_deps_block_check('0900', :eg_version);
+
CREATE OR REPLACE VIEW metabib.record_attr AS
SELECT id, HSTORE( ARRAY_AGG( attr ), ARRAY_AGG( value ) ) AS attrs
FROM metabib.record_attr_flat
commit 01d34ef839600f585afc9051d4bf4849106e3dd3
Author: Mike Rylander <mrylander at gmail.com>
Date: Mon Dec 15 20:32:51 2014 -0500
LP#1400376: Don't allow NULL attrs to polute an HSTORE as a key
That causes the HSTORE to blow up, which is bad for circs that
want to succeed.
Signed-off-by: Mike Rylander <mrylander at gmail.com>
Signed-off-by: Ben Shum <bshum at biblio.org>
diff --git a/Open-ILS/src/sql/Pg/030.schema.metabib.sql b/Open-ILS/src/sql/Pg/030.schema.metabib.sql
index c03868e..58729d8 100644
--- a/Open-ILS/src/sql/Pg/030.schema.metabib.sql
+++ b/Open-ILS/src/sql/Pg/030.schema.metabib.sql
@@ -421,7 +421,10 @@ CREATE VIEW metabib.record_attr_flat AS
LEFT JOIN config.coded_value_map c ON ( c.id = ANY( v.vlist ) );
CREATE VIEW metabib.record_attr AS
- SELECT id, HSTORE( ARRAY_AGG( attr ), ARRAY_AGG( value ) ) AS attrs FROM metabib.record_attr_flat GROUP BY 1;
+ SELECT id, HSTORE( ARRAY_AGG( attr ), ARRAY_AGG( value ) ) AS attrs
+ FROM metabib.record_attr_flat
+ WHERE attr IS NOT NULL
+ GROUP BY 1;
-- Back-back-compat view ... we use to live in an HSTORE world
CREATE TYPE metabib.rec_desc_type AS (
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.no-null-record_attrs.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.no-null-record_attrs.sql
new file mode 100644
index 0000000..ee7f305
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.no-null-record_attrs.sql
@@ -0,0 +1,10 @@
+BEGIN;
+
+CREATE OR REPLACE VIEW metabib.record_attr AS
+ SELECT id, HSTORE( ARRAY_AGG( attr ), ARRAY_AGG( value ) ) AS attrs
+ FROM metabib.record_attr_flat
+ WHERE attr IS NOT NULL
+ GROUP BY 1;
+
+COMMIT;
+
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +-
Open-ILS/src/sql/Pg/030.schema.metabib.sql | 5 ++++-
.../upgrade/0900.schema.no-null-record_attrs.sql | 12 ++++++++++++
3 files changed, 17 insertions(+), 2 deletions(-)
create mode 100644 Open-ILS/src/sql/Pg/upgrade/0900.schema.no-null-record_attrs.sql
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list