mirror of
https://github.com/moodle/moodle.git
synced 2025-07-16 11:56:31 +02:00
(plus it doesn't show IP information to everyone!) All old authors are not currently displayed (I chose not to) This is easy to fix if people want it, since the old author string is still there in the database.
28 lines
897 B
PHP
28 lines
897 B
PHP
<?PHP
|
|
|
|
function wiki_upgrade($oldversion) {
|
|
/// This function does anything necessary to upgrade
|
|
/// older versions to match current functionality
|
|
|
|
global $CFG;
|
|
|
|
if ($oldversion < 2004073000) {
|
|
|
|
modify_database("", "ALTER TABLE prefix_wiki_pages DROP COLUMN id;");
|
|
modify_database("", "ALTER TABLE ONLY prefix_wiki_pages
|
|
ADD CONSTRAINT id PRIMARY KEY (pagename, \"version\");");
|
|
}
|
|
if ($oldversion < 2004073001) {
|
|
|
|
modify_database("", "ALTER TABLE prefix_wiki_pages DROP CONSTRAINT id;");
|
|
modify_database("", "ALTER TABLE ONLY prefix_wiki_pages
|
|
ADD CONSTRAINT id PRIMARY KEY (pagename, \"version\", wiki);");
|
|
}
|
|
if ($oldversion < 2004082200) {
|
|
table_column('wiki_pages', '', 'userid', "integer", "10", "unsigned", "0", "not null", "author");
|
|
}
|
|
return true;
|
|
}
|
|
|
|
?>
|