LP#1666512 - Add billing types from 2009-era features.
authorChris Sharp <csharp@georgialibraries.org>
Tue, 21 Feb 2017 13:03:55 +0000 (08:03 -0500)
committerGalen Charlton <gmc@equinoxinitiative.org>
Wed, 4 Oct 2017 16:04:01 +0000 (12:04 -0400)
For systems that were running Evergreen 1.2 or so and upgraded to 1.4
or so, there were billing types added that did not make it into an
upgrade script.  We add them here just in case you don't have them.
Systems installed since Evergreen 1.4 are probably not affected.

Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Signed-off-by: Ben Shum <ben@evergreener.net>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>

Open-ILS/src/sql/Pg/upgrade/XXXX.data.add_possibly_missing_billing_types.sql [new file with mode: 0644]

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
new file mode 100644 (file)
index 0000000..a9d3d5c
--- /dev/null
@@ -0,0 +1,17 @@
+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) VALUES
+    ( 7, oils_i18n_gettext(7, 'Damaged Item', 'cbt', 'name'), 1);
+INSERT INTO config.billing_type (id, name, owner) VALUES
+    ( 8, oils_i18n_gettext(8, 'Damaged Item Processing Fee', 'cbt', 'name'), 1);
+INSERT INTO config.billing_type (id, name, owner) VALUES
+    ( 9, oils_i18n_gettext(9, 'Notification Fee', 'cbt', 'name'), 1);
+
+COMMIT;