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