Permalink
Browse files

moodle16cleanup: backup/ set the correct column datatype and default …

…value
  • Loading branch information...
1 parent 7f8199c commit aec6df38ac9646a38c3d5c73b45aa37659954f1a martinlanghoff committed May 17, 2006
Showing with 22 additions and 1 deletion.
  1. +21 −0 backup/db/postgres7.php
  2. +1 −1 backup/version.php
View
@@ -50,6 +50,27 @@ function backup_upgrade($oldversion=0) {
}
}
+ if ($oldversion < 2006042801) {
+ modify_database('', 'ALTER TABLE prefix_backup_log
+ ALTER COLUMN "time" TYPE integer,
+ ALTER COLUMN "time" SET DEFAULT 0,
+ ALTER COLUMN laststarttime TYPE integer,
+ ALTER COLUMN laststarttime SET DEFAULT 0,
+ ALTER COLUMN courseid TYPE integer,
+ ALTER COLUMN courseid SET DEFAULT 0');
+
+ modify_database('', 'ALTER TABLE mdl_backup_courses
+ ALTER COLUMN lastendtime TYPE integer,
+ ALTER COLUMN lastendtime SET DEFAULT 0,
+ ALTER COLUMN laststarttime TYPE integer,
+ ALTER COLUMN laststarttime SET DEFAULT 0,
+ ALTER COLUMN courseid TYPE integer,
+ ALTER COLUMN courseid SET DEFAULT 0,
+ ALTER COLUMN nextstarttime TYPE integer,
+ ALTER COLUMN nextstarttime SET DEFAULT 0');
+
+ }
+
//Finally, return result
return $result;
View
@@ -5,6 +5,6 @@
// database (backup_version) to determine whether upgrades should
// be performed (see db/backup_*.php)
-$backup_version = 2006042800; // The current version is a date (YYYYMMDDXX)
+$backup_version = 2006042801; // The current version is a date (YYYYMMDDXX)
$backup_release = "1.6beta4"; // User-friendly version number

0 comments on commit aec6df3

Please sign in to comment.