switch around order, update already existing setting
authorChris Sharp <csharp@georgialibraries.org>
Mon, 14 Jan 2019 15:35:33 +0000 (10:35 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Wed, 30 Jan 2019 14:24:13 +0000 (09:24 -0500)
Open-ILS/src/sql/Pg/version-upgrade/pines-post-3.2-upgrade.sql

index 09367d0..b0dcb59 100644 (file)
@@ -451,9 +451,8 @@ TRUE
 )
 ;
 
-
--- move parent/guardian field data to new field
-UPDATE actor.usr SET guardian = ident_value2, ident_value2 = NULL WHERE NOT deleted AND ident_value2 IS NOT NULL AND ident_value2 <> '';
+-- allow multiple email addresses to be entered in patron reg form
+UPDATE actor.org_unit_setting SET value = '"[^@<> ]+@[^@<> ]+\\.[^@.*<> ]{2,}"' WHERE name = 'ui.patron.edit.au.email.regex' and org_unit = 1;
 
 -- settings
 INSERT INTO actor.org_unit_setting (org_unit, name, value) VALUES 
@@ -463,8 +462,6 @@ INSERT INTO actor.org_unit_setting (org_unit, name, value) VALUES
 (1, 'ui.patron.edit.guardian_required_for_juv', 'true'),
 (1, 'ui.patron.edit.au.guardian.show', 'true'),
 (1, 'ui.patron.edit.au.guardian.suggest', 'true'),
--- allow multiple email addresses to be entered in patron reg form
-(1, 'ui.patron.edit.au.email.regex', '"[^@<> ]+@[^@<> ]+\\.[^@.*<> ]{2,}"'),
 -- date formatting for web client
 (1, 'webstaff.format.dates', '"MM/dd/yyyy"'),
 (1, 'webstaff.format.date_and_time', '"MM/dd/yyyy HH:mm"'),
@@ -472,4 +469,8 @@ INSERT INTO actor.org_unit_setting (org_unit, name, value) VALUES
 (1, 'opac.email_record.allow_without_login', 'true')
 ;
 
+-- move parent/guardian field data to new field
+UPDATE actor.usr SET guardian = ident_value2, ident_value2 = NULL WHERE NOT deleted AND ident_value2 IS NOT NULL AND ident_value2 <> '';
+
+
 COMMIT;