Skip to content

Commit

Permalink
moodle16cleanup: backup/ set the correct column datatype and default …
Browse files Browse the repository at this point in the history
…value
  • Loading branch information
martinlanghoff committed May 17, 2006
1 parent 7f8199c commit aec6df3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
21 changes: 21 additions & 0 deletions backup/db/postgres7.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion backup/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.