Eighth installment Patron card generation feature

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Chris Nighswonger 2008-03-17 10:43:58 -04:00 committed by Joshua Ferraro
parent 9ca39e88a0
commit d9da8093bb
2 changed files with 31 additions and 0 deletions

View File

@ -1451,6 +1451,21 @@ CREATE TABLE `overduerules` (
PRIMARY KEY (`branchcode`,`categorycode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Table structure for table `patroncards`
--
DROP TABLE IF EXISTS `patroncards`;
Create Table: CREATE TABLE `patroncards` (
`cardid` int(11) NOT NULL auto_increment,
`batch_id` varchar(10) NOT NULL default '1',
`borrowernumber` int(11) NOT NULL,
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`cardid`),
KEY `patroncards_ibfk_1` (`borrowernumber`),
CONSTRAINT `patroncards_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8
--
-- Table structure for table `patronimage`
--

View File

@ -1198,6 +1198,22 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
print "Upgrade to $DBversion done (IMPORTANT: Upgrading to Amazon.com Associates Web Service 4.0 ) ";
SetVersion ($DBversion);
}
$DBversion = "3.00.00.065";
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
$dbh->do("Create Table: CREATE TABLE `patroncards` (
`cardid` int(11) NOT NULL auto_increment,
`batch_id` varchar(10) NOT NULL default '1',
`borrowernumber` int(11) NOT NULL,
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`cardid`),
KEY `patroncards_ibfk_1` (`borrowernumber`),
CONSTRAINT `patroncards_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
print "Upgrade to $DBversion done (Adding patroncards table for patroncards generation feature. ) ";
SetVersion ($DBversion);
}
=item DropAllForeignKeys($table)
Drop all foreign keys of the table $table