Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
integration
prechecker
Commits
6d023160
Commit
6d023160
authored
Jan 14, 2011
by
Sam Hemelryk
Browse files
lib-db MDL-25790 Added missing rating indexs on existing 2.0 sites
parent
15257dd1
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/db/upgrade.php
View file @
6d023160
...
...
@@ -5936,6 +5936,24 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL");
upgrade_main_savepoint
(
true
,
2011011414
);
}
if
(
$oldversion
<
2011011415
)
{
//create the rating table indexes if required
$table
=
new
xmldb_table
(
'rating'
);
$index
=
new
xmldb_index
(
'itemid'
,
XMLDB_INDEX_NOTUNIQUE
,
array
(
'itemid'
));
if
(
!
$dbman
->
index_exists
(
$table
,
$index
))
{
$dbman
->
add_index
(
$table
,
$index
);
$key
=
new
xmldb_key
(
'contextid'
,
XMLDB_KEY_FOREIGN
,
array
(
'contextid'
),
'context'
,
array
(
'id'
));
$dbman
->
add_key
(
$table
,
$key
);
$key
=
new
xmldb_key
(
'userid'
,
XMLDB_KEY_FOREIGN
,
array
(
'userid'
),
'user'
,
array
(
'id'
));
$dbman
->
add_key
(
$table
,
$key
);
}
upgrade_main_savepoint
(
true
,
2011011415
);
}
return
true
;
}
...
...
version.php
View file @
6d023160
...
...
@@ -29,7 +29,7 @@
defined
(
'MOODLE_INTERNAL'
)
||
die
();
$version
=
201101141
4
;
// YYYYMMDD = date of the last version bump
$version
=
201101141
5
;
// YYYYMMDD = date of the last version bump
// XX = daily increments
$release
=
'2.0.1+ (Build: 20110112)'
;
// Human-friendly version name
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment