LP#1835577: stamp schema updates
authorGalen Charlton <gmc@equinoxinitiative.org>
Tue, 1 Oct 2019 21:19:51 +0000 (17:19 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Tue, 1 Oct 2019 21:19:51 +0000 (17:19 -0400)
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/1189.schema.auto_renewal_view_updates.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.auto_renewal_view_updates.sql [deleted file]

index 7b8db1d..f96960c 100644 (file)
@@ -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 ('1188', :eg_version); -- Dyrcona/gmcharlt
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1189', :eg_version); -- Dyrcona/gmcharlt
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/1189.schema.auto_renewal_view_updates.sql b/Open-ILS/src/sql/Pg/upgrade/1189.schema.auto_renewal_view_updates.sql
new file mode 100644 (file)
index 0000000..6c04d2b
--- /dev/null
@@ -0,0 +1,31 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('1189', :eg_version);
+
+CREATE OR REPLACE VIEW action.open_circulation AS
+       SELECT  *
+         FROM  action.circulation
+         WHERE checkin_time IS NULL
+         ORDER BY due_date;
+
+CREATE OR REPLACE VIEW action.billable_circulations AS
+       SELECT  *
+         FROM  action.circulation
+         WHERE xact_finish IS NULL;
+
+CREATE OR REPLACE VIEW reporter.overdue_circs AS
+SELECT  *
+  FROM  "action".circulation
+  WHERE checkin_time is null
+        AND (stop_fines NOT IN ('LOST','CLAIMSRETURNED') OR stop_fines IS NULL)
+        AND due_date < now();
+
+CREATE OR REPLACE VIEW reporter.circ_type AS
+SELECT id,
+       CASE WHEN opac_renewal OR phone_renewal OR desk_renewal OR auto_renewal
+               THEN 'RENEWAL'
+               ELSE 'CHECKOUT'
+       END AS "type"
+  FROM action.circulation;
+
+COMMIT;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.auto_renewal_view_updates.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.auto_renewal_view_updates.sql
deleted file mode 100644 (file)
index 9365993..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-BEGIN;
-
---SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
-
-CREATE OR REPLACE VIEW action.open_circulation AS
-       SELECT  *
-         FROM  action.circulation
-         WHERE checkin_time IS NULL
-         ORDER BY due_date;
-
-CREATE OR REPLACE VIEW action.billable_circulations AS
-       SELECT  *
-         FROM  action.circulation
-         WHERE xact_finish IS NULL;
-
-CREATE OR REPLACE VIEW reporter.overdue_circs AS
-SELECT  *
-  FROM  "action".circulation
-  WHERE checkin_time is null
-        AND (stop_fines NOT IN ('LOST','CLAIMSRETURNED') OR stop_fines IS NULL)
-        AND due_date < now();
-
-CREATE OR REPLACE VIEW reporter.circ_type AS
-SELECT id,
-       CASE WHEN opac_renewal OR phone_renewal OR desk_renewal OR auto_renewal
-               THEN 'RENEWAL'
-               ELSE 'CHECKOUT'
-       END AS "type"
-  FROM action.circulation;
-
-COMMIT;