mirror of
https://github.com/moodle/moodle.git
synced 2025-04-16 14:02:32 +02:00
MDL-10817, adding unique key courseid-coutcomeid during creation of grade_outcomes_courses
This commit is contained in:
parent
8ee4253761
commit
f37cc4bb35
@ -1459,9 +1459,10 @@ function xmldb_main_upgrade($oldversion=0) {
|
||||
$table->addKeyInfo('primary', XMLDB_KEY_PRIMARY, array('id'));
|
||||
$table->addKeyInfo('courseid', XMLDB_KEY_FOREIGN, array('courseid'), 'course', array('id'));
|
||||
$table->addKeyInfo('outcomeid', XMLDB_KEY_FOREIGN, array('outcomeid'), 'grade_outcomes', array('id'));
|
||||
|
||||
$table->addKeyInfo('courseid-outcomeid', XMLDB_KEY_UNIQUE, array('courseid', 'outcomeid'));
|
||||
/// Launch create table for grade_outcomes_courses
|
||||
$result = $result && create_table($table);
|
||||
$result = $result && create_table($table);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user