LP#1400376: Stamping upgrade script for fix to metabib.record_attr
authorBen Shum <bshum@biblio.org>
Tue, 16 Dec 2014 20:01:53 +0000 (15:01 -0500)
committerBen Shum <bshum@biblio.org>
Tue, 16 Dec 2014 20:03:06 +0000 (15:03 -0500)
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/0900.schema.no-null-record_attrs.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.no-null-record_attrs.sql [deleted file]

index c60c5f6..a62ee63 100644 (file)
@@ -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/0900.schema.no-null-record_attrs.sql b/Open-ILS/src/sql/Pg/upgrade/0900.schema.no-null-record_attrs.sql
new file mode 100644 (file)
index 0000000..9ed7c72
--- /dev/null
@@ -0,0 +1,12 @@
+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
+      WHERE attr IS NOT NULL
+      GROUP BY 1;
+
+COMMIT;
+
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
deleted file mode 100644 (file)
index ee7f305..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-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;
-