mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Some additions for postgresql
This commit is contained in:
parent
c563a9a0d1
commit
775f689b0f
@ -1,14 +1,28 @@
|
||||
<?PHP // $Id$
|
||||
|
||||
function gallery_upgrade($oldversion) {
|
||||
function workshop_upgrade($oldversion) {
|
||||
// This function does anything necessary to upgrade
|
||||
// older versions to match current functionality
|
||||
|
||||
global $CFG;
|
||||
|
||||
if ($oldversion < 2003043000) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -12,8 +12,8 @@ CREATE TABLE prefix_workshop (
|
||||
format INT2 NOT NULL default '0',
|
||||
gradingstrategy INT2 NOT NULL default '1',
|
||||
resubmit INT2 NOT NULL default '0',
|
||||
graded INT2 NOT NULL default '1',
|
||||
showgrades INT2 NOT NULL default '0',
|
||||
agreeassessments INT2 NOT NULL default '0',
|
||||
hidegrades INT2 NOT NULL default '0',
|
||||
anonymous INT2 NOT NULL default '0',
|
||||
includeself INT2 NOT NULL default '0',
|
||||
maxbytes INT8 NOT NULL default '100000',
|
||||
@ -28,7 +28,8 @@ CREATE TABLE prefix_workshop (
|
||||
includeteachersgrade INT NOT NULL default '0',
|
||||
biasweight INT NOT NULL default '5',
|
||||
reliabilityweight INT NOT NULL default '5',
|
||||
gradingweight INT NOT NULL default '5'
|
||||
gradingweight INT NOT NULL default '5',
|
||||
timeagreed INT8 NOT NULL default '0'
|
||||
);
|
||||
# --------------------------------------------------------
|
||||
|
||||
@ -100,6 +101,16 @@ CREATE TABLE prefix_workshop_grades (
|
||||
grade INT NOT NULL default '0'
|
||||
);
|
||||
# --------------------------------------------------------
|
||||
CREATE TABLE 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
|
||||
);
|
||||
|
||||
|
||||
INSERT INTO prefix_log_display VALUES ('workshop', 'assess', 'workshop', 'name');
|
||||
INSERT INTO prefix_log_display VALUES ('workshop', 'close', 'workshop', 'name');
|
||||
|
Loading…
x
Reference in New Issue
Block a user