← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13931: Script from alex tumwesigye

 

------------------------------------------------------------
revno: 13931
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-02-04 16:12:45 +0200
message:
  Script from alex tumwesigye
modified:
  resources/sql/div.sql


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'resources/sql/div.sql'
--- resources/sql/div.sql	2013-12-29 17:27:07 +0000
+++ resources/sql/div.sql	2014-02-04 14:12:45 +0000
@@ -208,6 +208,10 @@
 created = (created + interval '1 year'),
 lastupdated = (lastupdated + interval '1 year');
 
+-- Replace first digit in invalid uid with letter a
+
+update organisationunit set uid = regexp_replace(uid,'\d','a') where uid SIMILAR TO '[0-9]%';
+
 -- (Write) Insert random org unit codes
 
 create function setrandomcode() returns integer AS $$