|
Lines 3760-3765
DROP TABLE IF EXISTS `illrequests`;
Link Here
|
| 3760 |
CREATE TABLE `illrequests` ( |
3760 |
CREATE TABLE `illrequests` ( |
| 3761 |
`illrequest_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ILL request number', |
3761 |
`illrequest_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ILL request number', |
| 3762 |
`borrowernumber` int(11) DEFAULT NULL COMMENT 'Patron associated with request', |
3762 |
`borrowernumber` int(11) DEFAULT NULL COMMENT 'Patron associated with request', |
|
|
3763 |
`managedby` int(11) DEFAULT NULL COMMENT 'Staff member manager of request', |
| 3763 |
`biblio_id` int(11) DEFAULT NULL COMMENT 'Potential bib linked to request', |
3764 |
`biblio_id` int(11) DEFAULT NULL COMMENT 'Potential bib linked to request', |
| 3764 |
`deleted_biblio_id` int(11) DEFAULT NULL COMMENT 'Deleted bib linked to request', |
3765 |
`deleted_biblio_id` int(11) DEFAULT NULL COMMENT 'Deleted bib linked to request', |
| 3765 |
`due_date` datetime DEFAULT NULL COMMENT 'Custom date due specified by backend, leave NULL for default date_due calculation', |
3766 |
`due_date` datetime DEFAULT NULL COMMENT 'Custom date due specified by backend, leave NULL for default date_due calculation', |
|
Lines 3781-3786
CREATE TABLE `illrequests` (
Link Here
|
| 3781 |
`batch_id` int(11) DEFAULT NULL COMMENT 'Optional ID of batch that this request belongs to', |
3782 |
`batch_id` int(11) DEFAULT NULL COMMENT 'Optional ID of batch that this request belongs to', |
| 3782 |
PRIMARY KEY (`illrequest_id`), |
3783 |
PRIMARY KEY (`illrequest_id`), |
| 3783 |
KEY `illrequests_bnfk` (`borrowernumber`), |
3784 |
KEY `illrequests_bnfk` (`borrowernumber`), |
|
|
3785 |
KEY `illrequests_manfk` (`managedby`), |
| 3784 |
KEY `illrequests_bcfk_2` (`branchcode`), |
3786 |
KEY `illrequests_bcfk_2` (`branchcode`), |
| 3785 |
KEY `illrequests_safk` (`status_alias`), |
3787 |
KEY `illrequests_safk` (`status_alias`), |
| 3786 |
KEY `illrequests_bibfk` (`biblio_id`), |
3788 |
KEY `illrequests_bibfk` (`biblio_id`), |
|
Lines 3788-3793
CREATE TABLE `illrequests` (
Link Here
|
| 3788 |
CONSTRAINT `illrequests_bcfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE, |
3790 |
CONSTRAINT `illrequests_bcfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE, |
| 3789 |
CONSTRAINT `illrequests_bibfk` FOREIGN KEY (`biblio_id`) REFERENCES `biblio` (`biblionumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
3791 |
CONSTRAINT `illrequests_bibfk` FOREIGN KEY (`biblio_id`) REFERENCES `biblio` (`biblionumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
| 3790 |
CONSTRAINT `illrequests_bnfk` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
3792 |
CONSTRAINT `illrequests_bnfk` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
|
|
3793 |
CONSTRAINT `illrequests_manfk` FOREIGN KEY (`managedby`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
| 3791 |
CONSTRAINT `illrequests_ibfk` FOREIGN KEY (`batch_id`) REFERENCES `illbatches` (`ill_batch_id`) ON DELETE SET NULL ON UPDATE CASCADE, |
3794 |
CONSTRAINT `illrequests_ibfk` FOREIGN KEY (`batch_id`) REFERENCES `illbatches` (`ill_batch_id`) ON DELETE SET NULL ON UPDATE CASCADE, |
| 3792 |
CONSTRAINT `illrequests_safk` FOREIGN KEY (`status_alias`) REFERENCES `authorised_values` (`authorised_value`) ON DELETE SET NULL ON UPDATE CASCADE |
3795 |
CONSTRAINT `illrequests_safk` FOREIGN KEY (`status_alias`) REFERENCES `authorised_values` (`authorised_value`) ON DELETE SET NULL ON UPDATE CASCADE |
| 3793 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
3796 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |