From what I've found during initial investigations is that in Mahara v1.0 the artefact_access_role and artefact_access_usr tables did not exist - they were added in version 1.1.
If one does a fresh install of Mahara using v1.1 or later they get those two tables with the correct constraints/keys/foreign keys
However if they upgrade from version 1.0 they get those two tables missing all of the constraints/keys/foreign keys.
I've upgraded all the way form 1.0 to 1.8 in mysql and the keys are missing.
What is needed to start with is a patch to add the missing keys onto sites that have been upgraded from Mahara v1.0
From what I've found during initial investigations is that in Mahara v1.0 the artefact_ access_ role and artefact_access_usr tables did not exist - they were added in version 1.1.
If one does a fresh install of Mahara using v1.1 or later they get those two tables with the correct constraints/ keys/foreign keys
However if they upgrade from version 1.0 they get those two tables missing all of the constraints/ keys/foreign keys.
I've upgraded all the way form 1.0 to 1.8 in mysql and the keys are missing.
What is needed to start with is a patch to add the missing keys onto sites that have been upgraded from Mahara v1.0