Files
moodle/mod/wiki/db/postgres7.php
moodler 71fe1da3f4 Database now stores userid, and page info is now more Moodley
(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.
2004-08-22 16:41:54 +00:00

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;
}
?>