function course_update_8001 in Course 3.x
Add unique indexes.
File
- ./
course.install, line 24 - course.install Install and update functions for Courses.
Code
function course_update_8001() {
$schema = Database::getConnection()
->schema();
$schema
->addUniqueKey('course_enrollment', 'cid_uid', [
'cid',
'uid',
]);
$schema
->addUniqueKey('course_object_fulfillment', 'coid_uid', [
'coid',
'uid',
]);
return t('Added unique indexes.');
}