Lines 1746-1752
CREATE TABLE `issues` ( -- information related to check outs or issues
Link Here
|
1746 |
KEY `branchcode_idx` (`branchcode`), |
1746 |
KEY `branchcode_idx` (`branchcode`), |
1747 |
KEY `bordate` (`borrowernumber`,`timestamp`), |
1747 |
KEY `bordate` (`borrowernumber`,`timestamp`), |
1748 |
CONSTRAINT `issues_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE RESTRICT ON UPDATE CASCADE, |
1748 |
CONSTRAINT `issues_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE RESTRICT ON UPDATE CASCADE, |
1749 |
CONSTRAINT `issues_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE RESTRICT ON UPDATE CASCADE |
1749 |
CONSTRAINT `issues_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE RESTRICT ON UPDATE CASCADE, |
|
|
1750 |
CONSTRAINT `issues_ibfk_3` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE RESTRICT ON UPDATE CASCADE |
1750 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
1751 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
1751 |
|
1752 |
|
1752 |
-- |
1753 |
-- |
Lines 1776-1785
CREATE TABLE `old_issues` ( -- lists items that were checked out and have been r
Link Here
|
1776 |
KEY `old_issuesitemidx` (`itemnumber`), |
1777 |
KEY `old_issuesitemidx` (`itemnumber`), |
1777 |
KEY `branchcode_idx` (`branchcode`), |
1778 |
KEY `branchcode_idx` (`branchcode`), |
1778 |
KEY `old_bordate` (`borrowernumber`,`timestamp`), |
1779 |
KEY `old_bordate` (`borrowernumber`,`timestamp`), |
1779 |
CONSTRAINT `old_issues_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) |
1780 |
CONSTRAINT `old_issues_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE SET NULL, |
1780 |
ON DELETE SET NULL ON UPDATE SET NULL, |
1781 |
CONSTRAINT `old_issues_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE SET NULL, |
1781 |
CONSTRAINT `old_issues_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) |
1782 |
CONSTRAINT `old_issues_ibfk_3` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE RESTRICT ON UPDATE CASCADE |
1782 |
ON DELETE SET NULL ON UPDATE SET NULL |
|
|
1783 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
1783 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
1784 |
|
1784 |
|
1785 |
-- |
1785 |
-- |
1786 |
- |
|
|