LP#1666512: stamp DB update
authorGalen Charlton <gmc@equinoxinitiative.org>
Wed, 4 Oct 2017 16:10:31 +0000 (12:10 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Wed, 4 Oct 2017 16:10:31 +0000 (12:10 -0400)
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/1078.data.add_possibly_missing_billing_types.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.data.add_possibly_missing_billing_types.sql [deleted file]

index 9fb81da..6ef08e2 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 ('1077', :eg_version); -- csharp/gmcharlt
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1078', :eg_version); -- csharp/bshum/gmcharlt
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/1078.data.add_possibly_missing_billing_types.sql b/Open-ILS/src/sql/Pg/upgrade/1078.data.add_possibly_missing_billing_types.sql
new file mode 100644 (file)
index 0000000..d5c4705
--- /dev/null
@@ -0,0 +1,22 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('1078', :eg_version); -- csharp/bshum/gmcharlt
+
+-- The following billing types would not have been automatically added
+-- in upgrade scripts between versions 1.2 and 1.4 (early 2009).  We
+-- add them here.  It's okay if they fail, so this should probably be 
+-- run outside a transaction if added to the version-upgrade scripts.
+
+INSERT INTO config.billing_type (id, name, owner)
+    SELECT 7, 'Damaged Item', 1
+    WHERE NOT EXISTS (SELECT 1 FROM config.billing_type WHERE name = 'Damaged Item');
+
+INSERT INTO config.billing_type (id, name, owner)
+    SELECT 8, 'Damaged Item Processing Fee', 1
+    WHERE NOT EXISTS (SELECT 1 FROM config.billing_type WHERE name = 'Damaged Item Processing Fee');
+
+INSERT INTO config.billing_type (id, name, owner)
+    SELECT 9, 'Notification Fee', 1
+    WHERE NOT EXISTS (SELECT 1 FROM config.billing_type WHERE name = 'Notification Fee');
+
+COMMIT;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.add_possibly_missing_billing_types.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.add_possibly_missing_billing_types.sql
deleted file mode 100644 (file)
index 256c558..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-BEGIN;
-
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
-
--- The following billing types would not have been automatically added
--- in upgrade scripts between versions 1.2 and 1.4 (early 2009).  We
--- add them here.  It's okay if they fail, so this should probably be 
--- run outside a transaction if added to the version-upgrade scripts.
-
-INSERT INTO config.billing_type (id, name, owner)
-    SELECT 7, 'Damaged Item', 1
-    WHERE NOT EXISTS (SELECT 1 FROM config.billing_type WHERE name = 'Damaged Item');
-
-INSERT INTO config.billing_type (id, name, owner)
-    SELECT 8, 'Damaged Item Processing Fee', 1
-    WHERE NOT EXISTS (SELECT 1 FROM config.billing_type WHERE name = 'Damaged Item Processing Fee');
-
-INSERT INTO config.billing_type (id, name, owner)
-    SELECT 9, 'Notification Fee', 1
-    WHERE NOT EXISTS (SELECT 1 FROM config.billing_type WHERE name = 'Notification Fee');
-
-COMMIT;