Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Use type numeric(5,2) to store value 100.00

  • Loading branch information...
commit 5a8c647613fe7b9396805269ed2c078d3e8e4253 1 parent 1b6fe50
authored May 15, 2005
5  lib/db/postgres7.php
@@ -1086,6 +1086,11 @@ function main_upgrade($oldversion=0) {
1086 1086
         table_column('user', '', 'trackforums', 'int', '4', 'unsigned', '0', 'not null', 'autosubscribe');
1087 1087
     }
1088 1088
 
  1089
+    if ($oldversion < 2005051500) {  // Add user tracking prefs field.
  1090
+        table_column('grade_category', 'weight', 'weight', 'numeric(5,2)', '', '', '0.00', '', '');
  1091
+    }
  1092
+
  1093
+
1089 1094
     return $result;
1090 1095
 }
1091 1096
 
2  lib/db/postgres7.sql
@@ -134,7 +134,7 @@ CREATE TABLE prefix_grade_category (
134 134
   drop_x_lowest integer NOT NULL default '0',
135 135
   bonus_points integer NOT NULL default '0',
136 136
   hidden integer NOT NULL default '0',
137  
-  weight decimal(4,2) default '0.00'
  137
+  weight decimal(5,2) default '0.00'
138 138
 );
139 139
 
140 140
 CREATE INDEX prefix_grade_category_courseid_idx ON prefix_grade_category (courseid);
2  version.php
@@ -6,7 +6,7 @@
6 6
 // This is compared against the values stored in the database to determine
7 7
 // whether upgrades should be performed (see lib/db/*.php)
8 8
 
9  
-   $version = 2005050600;  // YYYYMMDD = date
  9
+   $version = 2005051500;  // YYYYMMDD = date
10 10
                            //       XY = increments within a single day
11 11
 
12 12
    $release = '1.5 ALPHA';    // Human-friendly version name

0 notes on commit 5a8c647

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