User story (meta) #2296
Build an update script to change existing eventLog after item renaming
| Status: | Released | Start date: | 2012-02-17 | |
|---|---|---|---|---|
| Priority: | N/A | Due date: | ||
| Assignee: | % 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
Associated revisions
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.
Issue #2296: change TestLog class name to make maven test runner happy
History
#1
Updated by François ARMAND about 1 year 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 about 1 year ago
- Target version changed from 2.4.0~alpha6 to 2.4.0~alpha7
#3
Updated by François ARMAND about 1 year ago
- Status changed from New to Pending technical review
- % Done changed from 0 to 100
Applied in changeset e6ae98b06c728ba7ff67405248d3be84abb6bf3b.
#4
Updated by Nicolas CHARLES 12 months 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 12 months ago
- Status changed from Pending functional review to Released