Lines 3277-3282
CREATE TABLE `illrequestattributes` (
Link Here
|
3277 |
CONSTRAINT `illrequestattributes_ifk` FOREIGN KEY (`illrequest_id`) REFERENCES `illrequests` (`illrequest_id`) ON DELETE CASCADE ON UPDATE CASCADE |
3277 |
CONSTRAINT `illrequestattributes_ifk` FOREIGN KEY (`illrequest_id`) REFERENCES `illrequests` (`illrequest_id`) ON DELETE CASCADE ON UPDATE CASCADE |
3278 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
3278 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
3279 |
/*!40101 SET character_set_client = @saved_cs_client */; |
3279 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
|
3280 |
-- |
3281 |
-- Table structure for table `illbatch_statuses` |
3282 |
-- |
3283 |
DROP TABLE IF EXISTS `illbatch_statuses`; |
3284 |
CREATE TABLE `illbatch_statuses` ( |
3285 |
`id` int(11) NOT NULL auto_increment, -- Status ID |
3286 |
`name` varchar(100) NOT NULL, -- Name of status |
3287 |
`code` varchar(20) NOT NULL, -- Unique, immutable code for status |
3288 |
`is_system` int(1), -- Is this status required for system operation |
3289 |
PRIMARY KEY (`id`), |
3290 |
UNIQUE KEY `u_illbatchstatuses__code` (`code`) |
3291 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
3292 |
|
3293 |
-- |
3294 |
-- Table structure for table `illbatches` |
3295 |
-- |
3296 |
DROP TABLE IF EXISTS `illbatches`; |
3297 |
CREATE TABLE `illbatches` ( |
3298 |
`id` int(11) NOT NULL auto_increment, -- Batch ID |
3299 |
`name` varchar(100) NOT NULL, -- Unique name of batch |
3300 |
`backend` varchar(20) NOT NULL, -- Name of batch backend |
3301 |
`borrowernumber` int(11), -- Patron associated with batch |
3302 |
`branchcode` varchar(50), -- Branch associated with batch |
3303 |
`statuscode` varchar(20), -- Status of batch |
3304 |
PRIMARY KEY (`id`), |
3305 |
UNIQUE KEY `u_illbatches__name` (`name`), |
3306 |
CONSTRAINT `illbatches_bnfk` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
3307 |
CONSTRAINT `illbatches_bcfk` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE SET NULL ON UPDATE CASCADE, |
3308 |
CONSTRAINT `illbatches_sfk` FOREIGN KEY (`statuscode`) REFERENCES `illbatch_statuses` (`code`) ON DELETE SET NULL ON UPDATE CASCADE |
3309 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
3280 |
|
3310 |
|
3281 |
-- |
3311 |
-- |
3282 |
-- Table structure for table `illrequests` |
3312 |
-- Table structure for table `illrequests` |
Lines 3305-3310
CREATE TABLE `illrequests` (
Link Here
|
3305 |
`notesstaff` mediumtext DEFAULT NULL COMMENT 'Staff notes attached to request', |
3335 |
`notesstaff` mediumtext DEFAULT NULL COMMENT 'Staff notes attached to request', |
3306 |
`orderid` varchar(50) DEFAULT NULL COMMENT 'Backend id attached to request', |
3336 |
`orderid` varchar(50) DEFAULT NULL COMMENT 'Backend id attached to request', |
3307 |
`backend` varchar(20) DEFAULT NULL COMMENT 'The backend used to create request', |
3337 |
`backend` varchar(20) DEFAULT NULL COMMENT 'The backend used to create request', |
|
|
3338 |
`batch_id` int(11) COMMENT 'Optional ID of batch that this request belongs to', |
3308 |
PRIMARY KEY (`illrequest_id`), |
3339 |
PRIMARY KEY (`illrequest_id`), |
3309 |
KEY `illrequests_bnfk` (`borrowernumber`), |
3340 |
KEY `illrequests_bnfk` (`borrowernumber`), |
3310 |
KEY `illrequests_bcfk_2` (`branchcode`), |
3341 |
KEY `illrequests_bcfk_2` (`branchcode`), |
Lines 3312-3318
CREATE TABLE `illrequests` (
Link Here
|
3312 |
CONSTRAINT `illrequests_bibfk` FOREIGN KEY (`biblio_id`) REFERENCES `biblio` (`biblionumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
3343 |
CONSTRAINT `illrequests_bibfk` FOREIGN KEY (`biblio_id`) REFERENCES `biblio` (`biblionumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
3313 |
CONSTRAINT `illrequests_bcfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE, |
3344 |
CONSTRAINT `illrequests_bcfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE, |
3314 |
CONSTRAINT `illrequests_bnfk` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
3345 |
CONSTRAINT `illrequests_bnfk` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
3315 |
CONSTRAINT `illrequests_safk` FOREIGN KEY (`status_alias`) REFERENCES `authorised_values` (`authorised_value`) ON DELETE SET NULL ON UPDATE CASCADE |
3346 |
CONSTRAINT `illrequests_safk` FOREIGN KEY (`status_alias`) REFERENCES `authorised_values` (`authorised_value`) ON DELETE SET NULL ON UPDATE CASCADE, |
|
|
3347 |
CONSTRAINT `illrequests_ibfk` FOREIGN KEY (`batch_id`) REFERENCES `illbatches` (`id`) ON DELETE SET NULL ON UPDATE CASCADE |
3316 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
3348 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
3317 |
/*!40101 SET character_set_client = @saved_cs_client */; |
3349 |
/*!40101 SET character_set_client = @saved_cs_client */; |
3318 |
|
3350 |
|