unwrapped upgrade script for cat.volume.delete_on_empty
authorBill Erickson <berick@esilibrary.com>
Fri, 3 Jun 2011 17:24:16 +0000 (13:24 -0400)
committerJason Etheridge <jason@esilibrary.com>
Fri, 24 Jun 2011 15:15:31 +0000 (11:15 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Open-ILS/src/sql/Pg/upgrade/XXXX.data.delete_empty_volume.sql [new file with mode: 0644]

diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.delete_empty_volume.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.delete_empty_volume.sql
new file mode 100644 (file)
index 0000000..d4a529f
--- /dev/null
@@ -0,0 +1,18 @@
+-- Evergreen DB patch XXXX.data.delete_empty_volume.sql
+--
+-- New org setting cat.volume.delete_on_empty
+--
+BEGIN;
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) 
+    VALUES ( 
+        'cat.volume.delete_on_empty',
+        oils_i18n_gettext('cat.volume.delete_on_empty', 'Cat: Delete volume with last copy', 'coust', 'label'),
+        oils_i18n_gettext('cat.volume.delete_on_empty', 'Automatically delete a volume when the last linked copy is deleted', 'coust', 'description'),
+        'bool'
+    );
+
+COMMIT;