User story (meta) #2296

Build an update script to change existing eventLog after item renaming

Added by François ARMAND over 2 years ago. Updated over 2 years ago.

Status:Released Start date:2012-02-17
Priority:N/A Due date:
Assignee:François ARMAND % Done:

100%

Category:Architecture - Refactoring
Target version:2.4.0~alpha7
Needs translating:No

Description

Following #2295, we will need to update the existing events log in database to change from old names to new ones.

That could be done thanks to Postgres XML functions (see: http://www.postgresql.org/docs/9.1/static/xml2.html) or a custom Scala script.

It will be done when the webapp starts, and look for the lowest version of fileFormat in base (see #2363 and #2364). Depending on them, compared to the required fileFormat, the script will update the database.


Related issues

blocked by Rudder - Bug #2361: Eventlog not correctly renamed Released 2012-03-05

Associated revisions

Revision e6ae98b0
Added by François ARMAND over 2 years ago

Fixes #2296: migration process to change EventLog fileFormat from 1.0 to 2. Test need postgresql but are enabled only if the -Dtest.postgres=true option is given.

Revision 7f894594
Added by François ARMAND over 2 years ago

Issue #2296: change TestLog class name to make maven test runner happy

History

#1 Updated by François ARMAND over 2 years ago

  • Description updated (diff)

Update requirement.

From an implementation point of view, we are leading to a pure XML update.

#2 Updated by Jonathan CLARKE over 2 years ago

  • Target version changed from 2.4.0~alpha6 to 2.4.0~alpha7

#3 Updated by François ARMAND over 2 years ago

  • Status changed from New to Pending technical review
  • % Done changed from 0 to 100

#4 Updated by Nicolas CHARLES over 2 years ago

  • Status changed from Pending technical review to Pending functional review

This looks valid.
I note that some SQL parts are not as expected, but latter commits corrected it ( c27d310cde9d649373cb9924508d5e0120a04ad3 to use temporary table, and b2298b24481c131d01e7c65527d3ada3427b4b19 for restoring timezone in the migration table)

#5 Updated by Jonathan CLARKE over 2 years ago

  • Status changed from Pending functional review to Released

Also available in: Atom PDF