Group Locking: 20.x migration script issue

Description

I found this problem in the MySQL conversion script, when migrating from 19.x to 20.x.

In this specific line:

https://github.com/sakaiproject/sakai-reference/blob/master/docs/conversion/sakai_20_mysql_conversion.sql#L127

This script moves the group properties into a new table, however, rows with the same ID can generate errors and the instruction aborts (Same REALM_KEY and REFERENCE), causing group properties not being migrated to the new table.

 

ERROR 1062 (23000): Duplicate entry > '23364-/assignment/a/iES2019A/04024549-01c4-4fe1-8886-7f381bd7ce4' for > key 'PRIMARY'

I've fixed the problem adding this snippet to the instruction:

ON DUPLICATE KEY UPDATE REALM_KEY = REALM_KEY;

Test this is kinda hard as it requires a 19.x database with groups, assignments, etc.

Activity

Fixed

Details

Priority

Affects versions

Fix versions

Assignee

Reporter

Created September 24, 2020 at 10:30 AM
Updated September 24, 2020 at 6:15 PM
Resolved September 24, 2020 at 6:15 PM

Flag notifications