Lines 2705-2711
DROP TABLE IF EXISTS `accountlines`;
Link Here
|
2705 |
CREATE TABLE `accountlines` ( |
2705 |
CREATE TABLE `accountlines` ( |
2706 |
`accountlines_id` int(11) NOT NULL AUTO_INCREMENT, |
2706 |
`accountlines_id` int(11) NOT NULL AUTO_INCREMENT, |
2707 |
`issue_id` int(11) NULL DEFAULT NULL, |
2707 |
`issue_id` int(11) NULL DEFAULT NULL, |
2708 |
`borrowernumber` int(11) NOT NULL default 0, |
2708 |
`borrowernumber` int(11) DEFAULT NULL, |
2709 |
`accountno` smallint(6) NOT NULL default 0, |
2709 |
`accountno` smallint(6) NOT NULL default 0, |
2710 |
`itemnumber` int(11) default NULL, |
2710 |
`itemnumber` int(11) default NULL, |
2711 |
`date` date default NULL, |
2711 |
`date` date default NULL, |
Lines 2722-2728
CREATE TABLE `accountlines` (
Link Here
|
2722 |
KEY `acctsborridx` (`borrowernumber`), |
2722 |
KEY `acctsborridx` (`borrowernumber`), |
2723 |
KEY `timeidx` (`timestamp`), |
2723 |
KEY `timeidx` (`timestamp`), |
2724 |
KEY `itemnumber` (`itemnumber`), |
2724 |
KEY `itemnumber` (`itemnumber`), |
2725 |
CONSTRAINT `accountlines_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
2725 |
CONSTRAINT `accountlines_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
2726 |
CONSTRAINT `accountlines_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE SET NULL |
2726 |
CONSTRAINT `accountlines_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE SET NULL |
2727 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
2727 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
2728 |
|
2728 |
|
2729 |
- |
|
|