The first argument (keyvalue) for oils_i18n_gettext _has_ to be match the primary...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 28 Sep 2009 20:40:08 +0000 (20:40 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 28 Sep 2009 20:40:08 +0000 (20:40 +0000)
just let any id from a sequence get chosen and then plug that value into oils_i18n_gettext)

git-svn-id: svn://svn.open-ils.org/ILS/trunk@14182 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/0024.data.default_billing_type.sql

index d1319b7..4c96083 100644 (file)
@@ -871,9 +871,9 @@ INSERT INTO config.billing_type (id, name, owner) VALUES
 INSERT INTO config.billing_type (id, name, owner) VALUES
        ( 9, oils_i18n_gettext(9, 'Notification Fee', 'cbt', 'name'), 1);
 
-SELECT SETVAL('config.billing_type_id_seq'::TEXT, 100);
+INSERT INTO config.billing_type (id, name, owner) VALUES ( 101, oils_i18n_gettext(101, 'Misc', 'cbt', 'name'), 1);
 
-INSERT INTO config.billing_type (name, owner) VALUES ( oils_i18n_gettext('Misc', 'Misc', 'cbt', 'name'), 1);
+SELECT SETVAL('config.billing_type_id_seq'::TEXT, 101);
 
 --006.data.permissions.sql:
 INSERT INTO permission.perm_list VALUES 
index f24a7a2..317ab44 100644 (file)
@@ -3,6 +3,7 @@ BEGIN;
 INSERT INTO config.upgrade_log (version) VALUES ('0024');
 
 -- This only gets inserted if there are no other id > 100 billing types
-INSERT INTO config.billing_type (name, owner) SELECT DISTINCT oils_i18n_gettext('Misc', 'Misc', 'cbt', 'name'), 1 FROM config.billing_type_id_seq WHERE last_value < 101;
+INSERT INTO config.billing_type (id, name, owner) SELECT DISTINCT 101, oils_i18n_gettext(101, 'Misc', 'cbt', 'name'), 1 FROM config.billing_type_id_seq WHERE last_value < 101;
+SELECT SETVAL('config.billing_type_id_seq'::TEXT, 101);
 
 COMMIT;