mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
Replaced the grade_outcomes_courses table that was deleted by accident
This commit is contained in:
parent
9838bfa6b2
commit
521d54ecea
3 changed files with 36 additions and 12 deletions
|
@ -1434,12 +1434,23 @@ function xmldb_main_upgrade($oldversion=0) {
|
|||
$result = $result && change_field_default($table, $field);
|
||||
}
|
||||
|
||||
if ($result && $oldversion < 2007073000) {
|
||||
// not used anymore
|
||||
$table = new XMLDBTable('grade_outcomes_courses');
|
||||
if (table_exists($table)) {
|
||||
drop_table($table);
|
||||
}
|
||||
|
||||
if ($result && $oldversion < 2007073100) {
|
||||
/// Define table grade_outcomes_courses to be created
|
||||
$table = new XMLDBTable('grade_outcomes_courses');
|
||||
|
||||
/// Adding fields to table grade_outcomes_courses
|
||||
$table->addFieldInfo('id', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, XMLDB_SEQUENCE, null, null, null);
|
||||
$table->addFieldInfo('courseid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, null);
|
||||
$table->addFieldInfo('outcomeid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, null);
|
||||
|
||||
/// Adding keys to table grade_outcomes_courses
|
||||
$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'));
|
||||
|
||||
/// Launch create table for grade_outcomes_courses
|
||||
$result = $result && create_table($table);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue