mirrored from git://git.moodle.org/moodle.git
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added official support for postgres7
- Loading branch information
jungwirr
committed
Oct 8, 2003
1 parent
a52fe88
commit aa47f27
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
function attendance_upgrade($oldversion) { | ||
/// This function does anything necessary to upgrade | ||
/// older versions to match current functionality | ||
|
||
global $CFG; | ||
|
||
//table_column($table, $oldfield, $field, $type="integer", $size="10", | ||
// $signed="unsigned", $default="0", $null="not null", $after="") | ||
|
||
|
||
if ($oldversion < 2003091802) { | ||
table_column("attendance", "", "edited", "integer", 2, "unsigned", "0", "not null"); | ||
execute_sql("UPDATE {$CFG->prefix}attendance set edited = 1;"); | ||
} | ||
if ($oldversion < 2003092500) { | ||
table_column("attendance", "", "autoattend", "integer", 2, "unsigned", "0", "not null"); | ||
} | ||
|
||
return true; | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# | ||
# Table structure for table `prefix_attendance` | ||
# | ||
|
||
CREATE TABLE prefix_attendance ( | ||
id SERIAL, | ||
name varchar(255) NOT NULL default '', | ||
course int4 NOT NULL default '0', | ||
day int4 NOT NULL default '0', | ||
hours int2 NOT NULL default '0', | ||
roll int2 NOT NULL default '0', | ||
notes varchar(64) NOT NULL default '', | ||
timemodified int4 NOT NULL default '0', | ||
dynsection int2 NOT NULL default '0', | ||
edited int2 NOT NULL default '0', | ||
autoattend int2 NOT NULL default '0', | ||
PRIMARY KEY(id) | ||
); | ||
|
||
# | ||
# Table structure for table `prefix_attendance_roll` | ||
# | ||
|
||
CREATE TABLE prefix_attendance_roll ( | ||
id SERIAL, | ||
dayid int4 NOT NULL default '0', | ||
userid int4 NOT NULL default '0', | ||
hour int2 NOT NULL default '0', | ||
status int4 NOT NULL default '0', | ||
notes varchar(64) NOT NULL default '', | ||
PRIMARY KEY (id) | ||
); |