Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Some additions for postgresql

  • Loading branch information...
commit 775f689b0fd7eb4148b3e1e2042b68acc690e8a9 1 parent c563a9a
authored May 18, 2003
20  mod/workshop/db/postgres7.php
... ...
@@ -1,14 +1,28 @@
1 1
 <?PHP // $Id$
2 2
 
3  
-function gallery_upgrade($oldversion) {
  3
+function workshop_upgrade($oldversion) {
4 4
 // This function does anything necessary to upgrade
5 5
 // older versions to match current functionality
6 6
 
7 7
     global $CFG;
8 8
 
9  
-    if ($oldversion < 2003043000) {
  9
+    if ($oldversion < 2003050400) {
  10
+	table_column("workshop","graded", "agreeassessments", "INT","2", "", "0" ,"NOT NULL");
  11
+	table_column("workshop", "showgrades","hidegrades", "INT","2", "","0", "NOT NULL");
  12
+	table_column("workshop_assessments","","timeagreed", "INT","8", "UNSIGNED", "0", "NOT NULL" );
10 13
 	
11  
-	}
  14
+	execute_sql("
  15
+            CREATE TABLE {$CFG->prefix}workshop_comments (
  16
+            id SERIAL8 PRIMARY KEY  ,
  17
+            workshopid int8 NOT NULL default '0', 
  18
+            assessmentid int8  NOT NULL default '0',
  19
+            userid int8 NOT NULL default '0',
  20
+            timecreated int8  NOT NULL default '0',
  21
+	    mailed int2  NOT NULL default '0',
  22
+            comments text NOT NULL
  23
+        )
  24
+        ");
  25
+    }
12 26
     return true;
13 27
 }
14 28
 
17  mod/workshop/db/postgres7.sql
@@ -12,8 +12,8 @@ CREATE TABLE prefix_workshop (
12 12
   format INT2  NOT NULL default '0',
13 13
   gradingstrategy INT2  NOT NULL default '1',
14 14
   resubmit INT2  NOT NULL default '0',
15  
-  graded INT2  NOT NULL default '1',
16  
-  showgrades INT2  NOT NULL default '0',
  15
+  agreeassessments INT2  NOT NULL default '0',
  16
+  hidegrades INT2  NOT NULL default '0',
17 17
   anonymous INT2  NOT NULL default '0',
18 18
   includeself INT2  NOT NULL default '0',
19 19
   maxbytes INT8  NOT NULL default '100000',
@@ -28,7 +28,8 @@ CREATE TABLE prefix_workshop (
28 28
   includeteachersgrade INT  NOT NULL default '0',
29 29
   biasweight INT  NOT NULL default '5',
30 30
   reliabilityweight INT  NOT NULL default '5',
31  
-  gradingweight INT  NOT NULL default '5'
  31
+  gradingweight INT  NOT NULL default '5',
  32
+  timeagreed INT8 NOT NULL default '0'
32 33
 );
33 34
 # --------------------------------------------------------
34 35
 
@@ -100,6 +101,16 @@ CREATE TABLE prefix_workshop_grades (
100 101
   grade INT NOT NULL default '0'
101 102
 );
102 103
 # --------------------------------------------------------
  104
+CREATE TABLE prefix_workshop_comments (
  105
+  id SERIAL8 PRIMARY KEY,
  106
+  workshopid int8 NOT NULL default '0',
  107
+  assessmentid int8  NOT NULL default '0',
  108
+  userid int8 NOT NULL default '0',
  109
+  timecreated int8  NOT NULL default '0',
  110
+  mailed int2  NOT NULL default '0',
  111
+  comments text NOT NULL
  112
+);
  113
+
103 114
 
104 115
 INSERT INTO prefix_log_display VALUES ('workshop', 'assess', 'workshop', 'name');
105 116
 INSERT INTO prefix_log_display VALUES ('workshop', 'close', 'workshop', 'name');

0 notes on commit 775f689

Please sign in to comment.
Something went wrong with that request. Please try again.