[open-ils-commits] r14182 - in trunk/Open-ILS/src/sql/Pg: . upgrade (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Sep 28 16:40:13 EDT 2009


Author: phasefx
Date: 2009-09-28 16:40:08 -0400 (Mon, 28 Sep 2009)
New Revision: 14182

Modified:
   trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
   trunk/Open-ILS/src/sql/Pg/upgrade/0024.data.default_billing_type.sql
Log:
The first argument (keyvalue) for oils_i18n_gettext _has_ to be match the primary key value for the row being inserted, and it has to be a consistent value from Evergreen to Evergreen for the I18N scripts to work (so we can't 
just let any id from a sequence get chosen and then plug that value into oils_i18n_gettext)



Modified: trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql	2009-09-28 18:43:48 UTC (rev 14181)
+++ trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql	2009-09-28 20:40:08 UTC (rev 14182)
@@ -871,9 +871,9 @@
 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 

Modified: trunk/Open-ILS/src/sql/Pg/upgrade/0024.data.default_billing_type.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0024.data.default_billing_type.sql	2009-09-28 18:43:48 UTC (rev 14181)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0024.data.default_billing_type.sql	2009-09-28 20:40:08 UTC (rev 14182)
@@ -3,6 +3,7 @@
 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;



More information about the open-ils-commits mailing list