Lines 2719-2733
CREATE TABLE `accountlines` (
Link Here
|
2719 |
`lastincrement` decimal(28,6) default NULL, |
2719 |
`lastincrement` decimal(28,6) default NULL, |
2720 |
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, |
2720 |
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, |
2721 |
`note` MEDIUMTEXT NULL default NULL, |
2721 |
`note` MEDIUMTEXT NULL default NULL, |
2722 |
`manager_id` int(11) NULL, |
2722 |
`manager_id` int(11) NULL DEFAULT NULL, |
2723 |
`branchcode` VARCHAR( 10 ) NULL DEFAULT NULL, -- the branchcode of the library where a payment was made, a manual invoice created, etc. |
2723 |
`branchcode` VARCHAR( 10 ) NULL DEFAULT NULL, -- the branchcode of the library where a payment was made, a manual invoice created, etc. |
2724 |
PRIMARY KEY (`accountlines_id`), |
2724 |
PRIMARY KEY (`accountlines_id`), |
2725 |
KEY `acctsborridx` (`borrowernumber`), |
2725 |
KEY `acctsborridx` (`borrowernumber`), |
2726 |
KEY `timeidx` (`timestamp`), |
2726 |
KEY `timeidx` (`timestamp`), |
2727 |
KEY `itemnumber` (`itemnumber`), |
2727 |
KEY `itemnumber` (`itemnumber`), |
2728 |
KEY `branchcode` (`branchcode`), |
2728 |
KEY `branchcode` (`branchcode`), |
|
|
2729 |
KEY `issue_id` (`issue_id`), |
2730 |
KEY `manager_id` (`manager_id`), |
2729 |
CONSTRAINT `accountlines_ibfk_borrowers` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
2731 |
CONSTRAINT `accountlines_ibfk_borrowers` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
2730 |
CONSTRAINT `accountlines_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE SET NULL, |
2732 |
CONSTRAINT `accountlines_ibfk_items` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
|
|
2733 |
CONSTRAINT `accountlines_ibfk_issues` FOREIGN KEY (`issue_id`) REFERENCES `issues` (`issue_id`) ON DELETE SET NULL ON UPDATE CASCADE, |
2734 |
CONSTRAINT `accountlines_ibfk_borrowers_2` FOREIGN KEY (`manager_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
2731 |
CONSTRAINT `accountlines_ibfk_branches` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE SET NULL ON UPDATE CASCADE |
2735 |
CONSTRAINT `accountlines_ibfk_branches` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE SET NULL ON UPDATE CASCADE |
2732 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
2736 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
2733 |
|
2737 |
|
2734 |
- |
|
|