moodle/mod/workshop/db/postgres7.php
2003-05-18 18:23:07 +00:00

32 lines
925 B
PHP

<?PHP // $Id$
function workshop_upgrade($oldversion) {
// This function does anything necessary to upgrade
// older versions to match current functionality
global $CFG;
if ($oldversion < 2003050400) {
table_column("workshop","graded", "agreeassessments", "INT","2", "", "0" ,"NOT NULL");
table_column("workshop", "showgrades","hidegrades", "INT","2", "","0", "NOT NULL");
table_column("workshop_assessments","","timeagreed", "INT","8", "UNSIGNED", "0", "NOT NULL" );
execute_sql("
CREATE TABLE {$CFG->prefix}workshop_comments (
id SERIAL8 PRIMARY KEY ,
workshopid int8 NOT NULL default '0',
assessmentid int8 NOT NULL default '0',
userid int8 NOT NULL default '0',
timecreated int8 NOT NULL default '0',
mailed int2 NOT NULL default '0',
comments text NOT NULL
)
");
}
return true;
}
?>