mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 20:53:53 +01:00
Some indexes were added in 15_STABLE. So, don't show an error message again if indexes are already exist.
This commit is contained in:
parent
3f5e294b97
commit
023c3f0ee2
@ -30,8 +30,8 @@ function enrol_authorize_upgrade($oldversion=0) {
|
||||
table_column('enrol_authorize', 'courseid', 'courseid', 'integer', '10', 'unsigned', '0', 'not null');
|
||||
table_column('enrol_authorize', 'userid', 'userid', 'integer', '10', 'unsigned', '0', 'not null');
|
||||
// Add some indexes for speed.
|
||||
modify_database('',"CREATE INDEX prefix_enrol_authorize_courseid_idx ON prefix_enrol_authorize (courseid);");
|
||||
modify_database('',"CREATE INDEX prefix_enrol_authorize_userid_idx ON prefix_enrol_authorize (userid);");
|
||||
execute_sql("CREATE INDEX {$CFG->prefix}enrol_authorize_courseid_idx ON {$CFG->prefix}enrol_authorize (courseid);", false);
|
||||
execute_sql("CREATE INDEX {$CFG->prefix}enrol_authorize_userid_idx ON {$CFG->prefix}enrol_authorize (userid);", false);
|
||||
}
|
||||
|
||||
if ($oldversion < 2005112100) {
|
||||
@ -44,7 +44,7 @@ function enrol_authorize_upgrade($oldversion=0) {
|
||||
// defaults.
|
||||
$timenow = time();
|
||||
$status = AN_STATUS_AUTH | AN_STATUS_CAPTURE;
|
||||
execute_sql(" UPDATE {$CFG->prefix}enrol_authorize SET timecreated='$timenow', timeupdated='$timenow', status='$status' ", false);
|
||||
execute_sql("UPDATE {$CFG->prefix}enrol_authorize SET timecreated='$timenow', timeupdated='$timenow', status='$status'", false);
|
||||
}
|
||||
|
||||
if ($oldversion < 2005121200) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user