-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #30 - fix installer issues re attendance record FK
- Loading branch information
Showing
2 changed files
with
26 additions
and
20 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,26 @@ | ||
<?php | ||
include_once 'include/db_object.class.php'; | ||
class Attendance_Record extends db_object | ||
{ | ||
// NB This class only exists for the following SQL | ||
// See Attendance_Record_Set for CRUD functionality of this table | ||
|
||
function getInitSQL($table_name=NULL) | ||
{ | ||
return " | ||
CREATE TABLE `attendance_record` ( | ||
`date` date NOT NULL, | ||
`personid` int(11) NOT NULL, | ||
`groupid` int(11) NOT NULL, | ||
`present` tinyint(1) unsigned NOT NULL, | ||
PRIMARY KEY (`date`,`personid`,`groupid`) | ||
) ENGINE=InnoDB ; | ||
"; | ||
} | ||
|
||
public function getForeignKeys() | ||
{ | ||
return Array('personid' => '`_person` (`id`) ON DELETE CASCADE'); | ||
} | ||
} | ||
?> |
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