|
Lines 3786-3791
DROP TABLE IF EXISTS `illrequests`;
Link Here
|
| 3786 |
CREATE TABLE `illrequests` ( |
3786 |
CREATE TABLE `illrequests` ( |
| 3787 |
`illrequest_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ILL request number', |
3787 |
`illrequest_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ILL request number', |
| 3788 |
`borrowernumber` int(11) DEFAULT NULL COMMENT 'Patron associated with request', |
3788 |
`borrowernumber` int(11) DEFAULT NULL COMMENT 'Patron associated with request', |
|
|
3789 |
`managedby` int(11) DEFAULT NULL COMMENT 'Staff member manager of request', |
| 3789 |
`biblio_id` int(11) DEFAULT NULL COMMENT 'Potential bib linked to request', |
3790 |
`biblio_id` int(11) DEFAULT NULL COMMENT 'Potential bib linked to request', |
| 3790 |
`deleted_biblio_id` int(11) DEFAULT NULL COMMENT 'Deleted bib linked to request', |
3791 |
`deleted_biblio_id` int(11) DEFAULT NULL COMMENT 'Deleted bib linked to request', |
| 3791 |
`due_date` datetime DEFAULT NULL COMMENT 'Custom date due specified by backend, leave NULL for default date_due calculation', |
3792 |
`due_date` datetime DEFAULT NULL COMMENT 'Custom date due specified by backend, leave NULL for default date_due calculation', |
|
Lines 3807-3812
CREATE TABLE `illrequests` (
Link Here
|
| 3807 |
`batch_id` int(11) DEFAULT NULL COMMENT 'Optional ID of batch that this request belongs to', |
3808 |
`batch_id` int(11) DEFAULT NULL COMMENT 'Optional ID of batch that this request belongs to', |
| 3808 |
PRIMARY KEY (`illrequest_id`), |
3809 |
PRIMARY KEY (`illrequest_id`), |
| 3809 |
KEY `illrequests_bnfk` (`borrowernumber`), |
3810 |
KEY `illrequests_bnfk` (`borrowernumber`), |
|
|
3811 |
KEY `illrequests_manfk` (`managedby`), |
| 3810 |
KEY `illrequests_bcfk_2` (`branchcode`), |
3812 |
KEY `illrequests_bcfk_2` (`branchcode`), |
| 3811 |
KEY `illrequests_safk` (`status_alias`), |
3813 |
KEY `illrequests_safk` (`status_alias`), |
| 3812 |
KEY `illrequests_bibfk` (`biblio_id`), |
3814 |
KEY `illrequests_bibfk` (`biblio_id`), |
|
Lines 3814-3819
CREATE TABLE `illrequests` (
Link Here
|
| 3814 |
CONSTRAINT `illrequests_bcfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE, |
3816 |
CONSTRAINT `illrequests_bcfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE, |
| 3815 |
CONSTRAINT `illrequests_bibfk` FOREIGN KEY (`biblio_id`) REFERENCES `biblio` (`biblionumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
3817 |
CONSTRAINT `illrequests_bibfk` FOREIGN KEY (`biblio_id`) REFERENCES `biblio` (`biblionumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
| 3816 |
CONSTRAINT `illrequests_bnfk` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
3818 |
CONSTRAINT `illrequests_bnfk` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
|
|
3819 |
CONSTRAINT `illrequests_manfk` FOREIGN KEY (`managedby`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
| 3817 |
CONSTRAINT `illrequests_ibfk` FOREIGN KEY (`batch_id`) REFERENCES `illbatches` (`ill_batch_id`) ON DELETE SET NULL ON UPDATE CASCADE, |
3820 |
CONSTRAINT `illrequests_ibfk` FOREIGN KEY (`batch_id`) REFERENCES `illbatches` (`ill_batch_id`) ON DELETE SET NULL ON UPDATE CASCADE, |
| 3818 |
CONSTRAINT `illrequests_safk` FOREIGN KEY (`status_alias`) REFERENCES `authorised_values` (`authorised_value`) ON DELETE SET NULL ON UPDATE CASCADE |
3821 |
CONSTRAINT `illrequests_safk` FOREIGN KEY (`status_alias`) REFERENCES `authorised_values` (`authorised_value`) ON DELETE SET NULL ON UPDATE CASCADE |
| 3819 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
3822 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |