Bug#1735072: Upgrade error with event_log updated columns
Several issues resolved:
1. The event_log.time column has been removed
and replaced by ctime. The handl_event() call is using
the new column even though the new column has
not been created yet in the upgrade script.
Therefore, include both columns in the event handling.
2. The 'deleteartefacts' event stores multiple
artefact IDs in the one event_log record. Therefore,
there is not a one-to-one relationship when converting the
record to the new format. Ignore the record when setting
the resourceid and resourcetype.
3. In the 'saveartefact' and 'deleteartefact' events,
not all of the event_log records have 'id' and 'artefact'.
Ignore setting the resourceid and resourcetype fields
when the data is not available.
4. For newer versions of Postgres and MySql, utilise
the json dattype to convert the data held in the
event_log.data column. This will speed up the
processing of the table for sites with large data
in the event_log table.
Reviewed: https:/ /reviews. mahara. org/8323 /git.mahara. org/mahara/ mahara/ commit/ a7acb6a54c360d5 bab86b6664b0fc3 9c3bd2288d
Committed: https:/
Submitter: Cecilia Vela Gurovic (<email address hidden>)
Branch: master
commit a7acb6a54c360d5 bab86b6664b0fc3 9c3bd2288d
Author: Ghada El-Zoghbi <email address hidden>
Date: Fri Dec 1 15:02:44 2017 +1100
Bug#1735072: Upgrade error with event_log updated columns
Several issues resolved:
1. The event_log.time column has been removed
and replaced by ctime. The handl_event() call is using
the new column even though the new column has
not been created yet in the upgrade script.
Therefore, include both columns in the event handling.
2. The 'deleteartefacts' event stores multiple
artefact IDs in the one event_log record. Therefore,
there is not a one-to-one relationship when converting the
record to the new format. Ignore the record when setting
the resourceid and resourcetype.
3. In the 'saveartefact' and 'deleteartefact' events,
not all of the event_log records have 'id' and 'artefact'.
Ignore setting the resourceid and resourcetype fields
when the data is not available.
4. For newer versions of Postgres and MySql, utilise
the json dattype to convert the data held in the
event_log.data column. This will speed up the
processing of the table for sites with large data
in the event_log table.
Sponsored by Australian National University
behatnotneeded
Change-Id: If068dac825b9ce f6301cd970f0a36 8124a67b3f1