Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 5a8c647613fe7b9396805269ed2c078d3e8e4253 1 parent 1b6fe50
paca70 authored
Showing with 7 additions and 2 deletions.
  1. +5 −0 lib/db/postgres7.php
  2. +1 −1  lib/db/postgres7.sql
  3. +1 −1  version.php
5 lib/db/postgres7.php
View
@@ -1086,6 +1086,11 @@ function main_upgrade($oldversion=0) {
table_column('user', '', 'trackforums', 'int', '4', 'unsigned', '0', 'not null', 'autosubscribe');
}
+ if ($oldversion < 2005051500) { // Add user tracking prefs field.
+ table_column('grade_category', 'weight', 'weight', 'numeric(5,2)', '', '', '0.00', '', '');
+ }
+
+
return $result;
}
2  lib/db/postgres7.sql
View
@@ -134,7 +134,7 @@ CREATE TABLE prefix_grade_category (
drop_x_lowest integer NOT NULL default '0',
bonus_points integer NOT NULL default '0',
hidden integer NOT NULL default '0',
- weight decimal(4,2) default '0.00'
+ weight decimal(5,2) default '0.00'
);
CREATE INDEX prefix_grade_category_courseid_idx ON prefix_grade_category (courseid);
2  version.php
View
@@ -6,7 +6,7 @@
// This is compared against the values stored in the database to determine
// whether upgrades should be performed (see lib/db/*.php)
- $version = 2005050600; // YYYYMMDD = date
+ $version = 2005051500; // YYYYMMDD = date
// XY = increments within a single day
$release = '1.5 ALPHA'; // Human-friendly version name
Please sign in to comment.
Something went wrong with that request. Please try again.