← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18097: Script

 

------------------------------------------------------------
revno: 18097
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2015-01-21 21:27:48 +0100
message:
  Script
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	2015-01-07 12:14:33 +0000
+++ resources/sql/div.sql	2015-01-21 20:27:48 +0000
@@ -256,11 +256,19 @@
 enddate = (enddate + interval '1 year')::date
 where extract(year from startdate) = 2013;
 
--- (Write) Move programstageinstance to next year
+-- (Write) Move programstageinstance and programinstance to next year
 
 update programstageinstance set 
 duedate = (duedate + interval '1 year'),
 executiondate = (executiondate + interval '1 year'),
+completeddate = (completeddate + interval '1 year'),
+created = (created + interval '1 year'),
+lastupdated = (lastupdated + interval '1 year');
+
+update programinstance set
+dateofincident = (dateofincident + interval '1 year'),
+enrollmentdate = (enrollmentdate + interval '1 year'),
+enddate = (enddate + interval '1 year'),
 created = (created + interval '1 year'),
 lastupdated = (lastupdated + interval '1 year');