diff --git a/db/upgrade.php b/db/upgrade.php index 0a42838..9d0d199 100644 --- a/db/upgrade.php +++ b/db/upgrade.php @@ -386,7 +386,7 @@ function xmldb_attendance_upgrade($oldversion=0) { // Adding keys to table attendance_warning. $table->add_key('primary', XMLDB_KEY_PRIMARY, array('id')); - $table->add_key('level_id', XMLDB_KEY_UNIQUE, array('idnumber, warningpercent, warnafter')); + $table->add_key('level_id', XMLDB_KEY_UNIQUE, array('idnumber', 'warningpercent', 'warnafter')); // Conditionally launch create table for attendance_warning. $dbman->create_table($table); @@ -401,7 +401,7 @@ function xmldb_attendance_upgrade($oldversion=0) { $DB->execute("DROP INDEX ". $name); } } - $index = new xmldb_key('level_id', XMLDB_KEY_UNIQUE, array('idnumber, warningpercent', 'warnafter')); + $index = new xmldb_key('level_id', XMLDB_KEY_UNIQUE, array('idnumber', 'warningpercent', 'warnafter')); $dbman->add_key($table, $index); } // Attendance savepoint reached.