For some reason I already had cat.default_classification_scheme (my db started at...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 14 Sep 2010 15:39:58 +0000 (15:39 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 14 Sep 2010 15:39:58 +0000 (15:39 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@17652 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Pg/upgrade/0394.data.org-setting-cat.default_classification_scheme.sql

index 178b2ff..db995bf 100644 (file)
@@ -3,7 +3,7 @@ BEGIN;
 INSERT INTO config.upgrade_log (version) VALUES ('0394'); -- gmc
 
 INSERT INTO config.org_unit_setting_type ( name, label, description, datatype, fm_class )
-VALUES (
+SELECT DISTINCT
     'cat.default_classification_scheme',
     oils_i18n_gettext(
         'cat.default_classification_scheme',
@@ -19,6 +19,7 @@ VALUES (
         ),
     'link',
     'acnc'
-);
+FROM config.org_unit_setting_type
+WHERE NOT EXISTS (SELECT 1 FROM config.org_unit_setting_type WHERE name = 'cat.default_classification_scheme');
 
 COMMIT;