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