Lines 1861-1867
CREATE TABLE `club_holds_to_patron_holds` (
Link Here
|
1861 |
KEY `clubs_holds_paton_holds_ibfk_3` (`hold_id`), |
1861 |
KEY `clubs_holds_paton_holds_ibfk_3` (`hold_id`), |
1862 |
CONSTRAINT `clubs_holds_paton_holds_ibfk_1` FOREIGN KEY (`club_hold_id`) REFERENCES `club_holds` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, |
1862 |
CONSTRAINT `clubs_holds_paton_holds_ibfk_1` FOREIGN KEY (`club_hold_id`) REFERENCES `club_holds` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, |
1863 |
CONSTRAINT `clubs_holds_paton_holds_ibfk_2` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
1863 |
CONSTRAINT `clubs_holds_paton_holds_ibfk_2` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
1864 |
CONSTRAINT `clubs_holds_paton_holds_ibfk_3` FOREIGN KEY (`hold_id`) REFERENCES `reserves` (`reserve_id`) ON DELETE CASCADE ON UPDATE CASCADE |
1864 |
CONSTRAINT `clubs_holds_paton_holds_ibfk_3` FOREIGN KEY (`hold_id`) REFERENCES `holds` (`id`) ON DELETE CASCADE ON UPDATE CASCADE |
1865 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
1865 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
1866 |
/*!40101 SET character_set_client = @saved_cs_client */; |
1866 |
/*!40101 SET character_set_client = @saved_cs_client */; |
1867 |
|
1867 |
|
Lines 2635-2640
CREATE TABLE `hold_fill_targets` (
Link Here
|
2635 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
2635 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
2636 |
/*!40101 SET character_set_client = @saved_cs_client */; |
2636 |
/*!40101 SET character_set_client = @saved_cs_client */; |
2637 |
|
2637 |
|
|
|
2638 |
-- |
2639 |
-- Table structure for table `holds` |
2640 |
-- |
2641 |
|
2642 |
DROP TABLE IF EXISTS `holds`; |
2643 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
2644 |
/*!40101 SET character_set_client = utf8 */; |
2645 |
CREATE TABLE `holds` ( |
2646 |
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'internal hold identifier', |
2647 |
`patron_id` int(11) DEFAULT NULL COMMENT 'foreign key from the borrowers table defining which patron this hold is for', |
2648 |
`pickup_library_id` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'foreign key from the branches table defining which branch the patron wishes to pick this hold up at', |
2649 |
`desk_id` int(11) DEFAULT NULL COMMENT 'foreign key from the desks table defining which desk the patron should pick this hold up at', |
2650 |
`created_date` date DEFAULT NULL COMMENT 'the date the hold was placed', |
2651 |
`biblio_id` int(11) DEFAULT NULL COMMENT 'foreign key from the biblio table defining which bib record this hold is on', |
2652 |
`item_id` int(11) DEFAULT NULL COMMENT 'foreign key from the items table defining the specific item the patron has placed on hold or the item this hold was filled with', |
2653 |
`item_type` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'If record level hold, the optional itemtype of the item the patron is requesting', |
2654 |
`item_level` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Is the hold was placed at item level', |
2655 |
`completed_date` date DEFAULT NULL COMMENT 'the date this hold was completed (fulfilled or cancelled)', |
2656 |
`notes` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'notes related to this hold', |
2657 |
`priority` smallint(6) NOT NULL DEFAULT 1 COMMENT 'where in the queue the patron sits', |
2658 |
`status` enum('placed','fulfilled','processing','waiting','in_transit','cancelled') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'placed' COMMENT 'the status the hold is (''placed'', ''fulfilled'', ''waiting'', ''in_transit'', ''cancelled'')', |
2659 |
`timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'the date and time this hold was last updated', |
2660 |
`waiting_date` date DEFAULT NULL COMMENT 'the date the item was marked as waiting for the patron at the library', |
2661 |
`expiration_date` date DEFAULT NULL COMMENT 'the date the hold expires (usually the date entered by the patron to say they don''t need the hold after a certain date)', |
2662 |
`lowest_priority` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'if it was assigned the lowest priority', |
2663 |
`non_priority` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'if it was assigned no priority', |
2664 |
`suspended` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'If it is a non-priority hold', |
2665 |
`suspended_until_date` datetime DEFAULT NULL COMMENT 'Date until it is suspended', |
2666 |
`completed` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'If it has been completed (i.e. either ''fulfilled'' or ''cancelled'')', |
2667 |
`cancellation_reason` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'optional authorised value CANCELLATION_REASON', |
2668 |
PRIMARY KEY (`id`), |
2669 |
KEY `priority_status_idx` (`priority`,`status`), |
2670 |
KEY `patron_id` (`patron_id`), |
2671 |
KEY `biblio_id` (`biblio_id`), |
2672 |
KEY `item_id` (`item_id`), |
2673 |
KEY `pickup_library_id` (`pickup_library_id`), |
2674 |
KEY `item_type` (`item_type`), |
2675 |
KEY `holds_ibfk_2` (`desk_id`), |
2676 |
CONSTRAINT `holds_ibfk_1` FOREIGN KEY (`biblio_id`) REFERENCES `biblio` (`biblionumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
2677 |
CONSTRAINT `holds_ibfk_2` FOREIGN KEY (`desk_id`) REFERENCES `desks` (`desk_id`) ON DELETE SET NULL ON UPDATE CASCADE, |
2678 |
CONSTRAINT `holds_ibfk_3` FOREIGN KEY (`item_id`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
2679 |
CONSTRAINT `holds_ibfk_4` FOREIGN KEY (`item_type`) REFERENCES `itemtypes` (`itemtype`) ON DELETE SET NULL ON UPDATE CASCADE, |
2680 |
CONSTRAINT `holds_ibfk_5` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
2681 |
CONSTRAINT `holds_ibfk_6` FOREIGN KEY (`pickup_library_id`) REFERENCES `branches` (`branchcode`) ON DELETE SET NULL ON UPDATE CASCADE |
2682 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
2683 |
/*!40101 SET character_set_client = @saved_cs_client */; |
2684 |
|
2638 |
-- |
2685 |
-- |
2639 |
-- Table structure for table `housebound_profile` |
2686 |
-- Table structure for table `housebound_profile` |
2640 |
-- |
2687 |
-- |
Lines 3848-3895
CREATE TABLE `old_issues` (
Link Here
|
3848 |
/*!40101 SET character_set_client = @saved_cs_client */; |
3895 |
/*!40101 SET character_set_client = @saved_cs_client */; |
3849 |
|
3896 |
|
3850 |
-- |
3897 |
-- |
3851 |
-- Table structure for table `old_reserves` |
3898 |
-- Temporary table structure for view `old_reserves` |
3852 |
-- |
3899 |
-- |
3853 |
|
3900 |
|
3854 |
DROP TABLE IF EXISTS `old_reserves`; |
3901 |
DROP TABLE IF EXISTS `old_reserves`; |
3855 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
3902 |
/*!50001 DROP VIEW IF EXISTS `old_reserves`*/; |
3856 |
/*!40101 SET character_set_client = utf8 */; |
3903 |
SET @saved_cs_client = @@character_set_client; |
3857 |
CREATE TABLE `old_reserves` ( |
3904 |
SET character_set_client = utf8; |
3858 |
`reserve_id` int(11) NOT NULL COMMENT 'primary key', |
3905 |
/*!50001 CREATE TABLE `old_reserves` ( |
3859 |
`borrowernumber` int(11) DEFAULT NULL COMMENT 'foreign key from the borrowers table defining which patron this hold is for', |
3906 |
`reserve_id` tinyint NOT NULL, |
3860 |
`reservedate` date DEFAULT NULL COMMENT 'the date the hold was places', |
3907 |
`borrowernumber` tinyint NOT NULL, |
3861 |
`biblionumber` int(11) DEFAULT NULL COMMENT 'foreign key from the biblio table defining which bib record this hold is on', |
3908 |
`reservedate` tinyint NOT NULL, |
3862 |
`branchcode` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'foreign key from the branches table defining which branch the patron wishes to pick this hold up at', |
3909 |
`biblionumber` tinyint NOT NULL, |
3863 |
`desk_id` int(11) DEFAULT NULL COMMENT 'foreign key from the desks table defining which desk the patron should pick this hold up at', |
3910 |
`branchcode` tinyint NOT NULL, |
3864 |
`notificationdate` date DEFAULT NULL COMMENT 'currently unused', |
3911 |
`desk_id` tinyint NOT NULL, |
3865 |
`reminderdate` date DEFAULT NULL COMMENT 'currently unused', |
3912 |
`cancellationdate` tinyint NOT NULL, |
3866 |
`cancellationdate` date DEFAULT NULL COMMENT 'the date this hold was cancelled', |
3913 |
`cancellation_reason` tinyint NOT NULL, |
3867 |
`cancellation_reason` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'optional authorised value CANCELLATION_REASON', |
3914 |
`reservenotes` tinyint NOT NULL, |
3868 |
`reservenotes` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'notes related to this hold', |
3915 |
`priority` tinyint NOT NULL, |
3869 |
`priority` smallint(6) NOT NULL DEFAULT 1 COMMENT 'where in the queue the patron sits', |
3916 |
`found` tinyint NOT NULL, |
3870 |
`found` varchar(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'a one letter code defining what the status is of the hold is after it has been confirmed', |
3917 |
`timestamp` tinyint NOT NULL, |
3871 |
`timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'the date and time this hold was last updated', |
3918 |
`itemnumber` tinyint NOT NULL, |
3872 |
`itemnumber` int(11) DEFAULT NULL COMMENT 'foreign key from the items table defining the specific item the patron has placed on hold or the item this hold was filled with', |
3919 |
`waitingdate` tinyint NOT NULL, |
3873 |
`waitingdate` date DEFAULT NULL COMMENT 'the date the item was marked as waiting for the patron at the library', |
3920 |
`expirationdate` tinyint NOT NULL, |
3874 |
`expirationdate` date DEFAULT NULL COMMENT 'the date the hold expires (usually the date entered by the patron to say they don''t need the hold after a certain date)', |
3921 |
`lowestPriority` tinyint NOT NULL, |
3875 |
`lowestPriority` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'has this hold been pinned to the lowest priority in the holds queue (1 for yes, 0 for no)', |
3922 |
`suspend` tinyint NOT NULL, |
3876 |
`suspend` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'in this hold suspended (1 for yes, 0 for no)', |
3923 |
`suspend_until` tinyint NOT NULL, |
3877 |
`suspend_until` datetime DEFAULT NULL COMMENT 'the date this hold is suspended until (NULL for infinitely)', |
3924 |
`itemtype` tinyint NOT NULL, |
3878 |
`itemtype` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'If record level hold, the optional itemtype of the item the patron is requesting', |
3925 |
`item_level_hold` tinyint NOT NULL, |
3879 |
`item_level_hold` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Is the hpld placed at item level', |
3926 |
`non_priority` tinyint NOT NULL |
3880 |
`non_priority` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Is this a non priority hold', |
3927 |
) ENGINE=MyISAM */; |
3881 |
PRIMARY KEY (`reserve_id`), |
3928 |
SET character_set_client = @saved_cs_client; |
3882 |
KEY `old_reserves_borrowernumber` (`borrowernumber`), |
|
|
3883 |
KEY `old_reserves_biblionumber` (`biblionumber`), |
3884 |
KEY `old_reserves_itemnumber` (`itemnumber`), |
3885 |
KEY `old_reserves_branchcode` (`branchcode`), |
3886 |
KEY `old_reserves_itemtype` (`itemtype`), |
3887 |
CONSTRAINT `old_reserves_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE SET NULL, |
3888 |
CONSTRAINT `old_reserves_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE SET NULL ON UPDATE SET NULL, |
3889 |
CONSTRAINT `old_reserves_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE SET NULL, |
3890 |
CONSTRAINT `old_reserves_ibfk_4` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`) ON DELETE SET NULL ON UPDATE SET NULL |
3891 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
3892 |
/*!40101 SET character_set_client = @saved_cs_client */; |
3893 |
|
3929 |
|
3894 |
-- |
3930 |
-- |
3895 |
-- Table structure for table `opac_news` |
3931 |
-- Table structure for table `opac_news` |
Lines 4287-4338
CREATE TABLE `reports_dictionary` (
Link Here
|
4287 |
/*!40101 SET character_set_client = @saved_cs_client */; |
4323 |
/*!40101 SET character_set_client = @saved_cs_client */; |
4288 |
|
4324 |
|
4289 |
-- |
4325 |
-- |
4290 |
-- Table structure for table `reserves` |
4326 |
-- Temporary table structure for view `reserves` |
4291 |
-- |
4327 |
-- |
4292 |
|
4328 |
|
4293 |
DROP TABLE IF EXISTS `reserves`; |
4329 |
DROP TABLE IF EXISTS `reserves`; |
4294 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
4330 |
/*!50001 DROP VIEW IF EXISTS `reserves`*/; |
4295 |
/*!40101 SET character_set_client = utf8 */; |
4331 |
SET @saved_cs_client = @@character_set_client; |
4296 |
CREATE TABLE `reserves` ( |
4332 |
SET character_set_client = utf8; |
4297 |
`reserve_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key', |
4333 |
/*!50001 CREATE TABLE `reserves` ( |
4298 |
`borrowernumber` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the borrowers table defining which patron this hold is for', |
4334 |
`reserve_id` tinyint NOT NULL, |
4299 |
`reservedate` date DEFAULT NULL COMMENT 'the date the hold was placed', |
4335 |
`borrowernumber` tinyint NOT NULL, |
4300 |
`biblionumber` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the biblio table defining which bib record this hold is on', |
4336 |
`reservedate` tinyint NOT NULL, |
4301 |
`branchcode` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'foreign key from the branches table defining which branch the patron wishes to pick this hold up at', |
4337 |
`biblionumber` tinyint NOT NULL, |
4302 |
`desk_id` int(11) DEFAULT NULL COMMENT 'foreign key from the desks table defining which desk the patron should pick this hold up at', |
4338 |
`branchcode` tinyint NOT NULL, |
4303 |
`notificationdate` date DEFAULT NULL COMMENT 'currently unused', |
4339 |
`desk_id` tinyint NOT NULL, |
4304 |
`reminderdate` date DEFAULT NULL COMMENT 'currently unused', |
4340 |
`cancellationdate` tinyint NOT NULL, |
4305 |
`cancellationdate` date DEFAULT NULL COMMENT 'the date this hold was cancelled', |
4341 |
`cancellation_reason` tinyint NOT NULL, |
4306 |
`cancellation_reason` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'optional authorised value CANCELLATION_REASON', |
4342 |
`reservenotes` tinyint NOT NULL, |
4307 |
`reservenotes` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'notes related to this hold', |
4343 |
`priority` tinyint NOT NULL, |
4308 |
`priority` smallint(6) NOT NULL DEFAULT 1 COMMENT 'where in the queue the patron sits', |
4344 |
`found` tinyint NOT NULL, |
4309 |
`found` varchar(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'a one letter code defining what the status is of the hold is after it has been confirmed', |
4345 |
`timestamp` tinyint NOT NULL, |
4310 |
`timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'the date and time this hold was last updated', |
4346 |
`itemnumber` tinyint NOT NULL, |
4311 |
`itemnumber` int(11) DEFAULT NULL COMMENT 'foreign key from the items table defining the specific item the patron has placed on hold or the item this hold was filled with', |
4347 |
`waitingdate` tinyint NOT NULL, |
4312 |
`waitingdate` date DEFAULT NULL COMMENT 'the date the item was marked as waiting for the patron at the library', |
4348 |
`expirationdate` tinyint NOT NULL, |
4313 |
`expirationdate` date DEFAULT NULL COMMENT 'the date the hold expires (usually the date entered by the patron to say they don''t need the hold after a certain date)', |
4349 |
`lowestPriority` tinyint NOT NULL, |
4314 |
`lowestPriority` tinyint(1) NOT NULL DEFAULT 0, |
4350 |
`suspend` tinyint NOT NULL, |
4315 |
`suspend` tinyint(1) NOT NULL DEFAULT 0, |
4351 |
`suspend_until` tinyint NOT NULL, |
4316 |
`suspend_until` datetime DEFAULT NULL, |
4352 |
`itemtype` tinyint NOT NULL, |
4317 |
`itemtype` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'If record level hold, the optional itemtype of the item the patron is requesting', |
4353 |
`item_level_hold` tinyint NOT NULL, |
4318 |
`item_level_hold` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Is the hpld placed at item level', |
4354 |
`non_priority` tinyint NOT NULL |
4319 |
`non_priority` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Is this a non priority hold', |
4355 |
) ENGINE=MyISAM */; |
4320 |
PRIMARY KEY (`reserve_id`), |
4356 |
SET character_set_client = @saved_cs_client; |
4321 |
KEY `priorityfoundidx` (`priority`,`found`), |
|
|
4322 |
KEY `borrowernumber` (`borrowernumber`), |
4323 |
KEY `biblionumber` (`biblionumber`), |
4324 |
KEY `itemnumber` (`itemnumber`), |
4325 |
KEY `branchcode` (`branchcode`), |
4326 |
KEY `desk_id` (`desk_id`), |
4327 |
KEY `itemtype` (`itemtype`), |
4328 |
CONSTRAINT `reserves_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
4329 |
CONSTRAINT `reserves_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
4330 |
CONSTRAINT `reserves_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
4331 |
CONSTRAINT `reserves_ibfk_4` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE, |
4332 |
CONSTRAINT `reserves_ibfk_5` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`) ON DELETE CASCADE ON UPDATE CASCADE, |
4333 |
CONSTRAINT `reserves_ibfk_6` FOREIGN KEY (`desk_id`) REFERENCES `desks` (`desk_id`) ON DELETE SET NULL ON UPDATE CASCADE |
4334 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
4335 |
/*!40101 SET character_set_client = @saved_cs_client */; |
4336 |
|
4357 |
|
4337 |
-- |
4358 |
-- |
4338 |
-- Table structure for table `return_claims` |
4359 |
-- Table structure for table `return_claims` |
Lines 5325-5331
CREATE TABLE `zebraqueue` (
Link Here
|
5325 |
KEY `zebraqueue_lookup` (`server`,`biblio_auth_number`,`operation`,`done`) |
5346 |
KEY `zebraqueue_lookup` (`server`,`biblio_auth_number`,`operation`,`done`) |
5326 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
5347 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
5327 |
/*!40101 SET character_set_client = @saved_cs_client */; |
5348 |
/*!40101 SET character_set_client = @saved_cs_client */; |
5328 |
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; |
5349 |
|
|
|
5350 |
-- |
5351 |
-- Table structure for table `reserves` |
5352 |
-- |
5353 |
|
5354 |
CREATE VIEW `reserves` |
5355 |
AS |
5356 |
SELECT |
5357 |
`id` AS `reserve_id`, |
5358 |
`patron_id` AS `borrowernumber`, |
5359 |
`created_date` AS `reservedate`, |
5360 |
`biblio_id` AS `biblionumber`, |
5361 |
`pickup_library_id` AS `branchcode`, |
5362 |
`desk_id`, |
5363 |
NULL AS `cancellationdate`, |
5364 |
`cancellation_reason`, |
5365 |
`notes` AS `reservenotes`, |
5366 |
`priority`, |
5367 |
CASE |
5368 |
when `status` = 'waiting' then |
5369 |
'W' |
5370 |
when `status` = 'in_transit' then |
5371 |
'T' |
5372 |
else |
5373 |
NULL |
5374 |
END AS `found`, |
5375 |
`timestamp`, |
5376 |
`item_id` AS `itemnumber`, |
5377 |
`waiting_date` AS `waitingdate`, |
5378 |
`expiration_date` AS `expirationdate`, |
5379 |
`lowest_priority` AS `lowestPriority`, |
5380 |
`suspended` AS `suspend`, |
5381 |
`suspended_until_date` AS `suspend_until`, |
5382 |
`item_type` AS `itemtype`, |
5383 |
`item_level` AS `item_level_hold`, |
5384 |
`non_priority` |
5385 |
FROM `holds` |
5386 |
WHERE completed=0; |
5387 |
|
5388 |
-- |
5389 |
-- Table structure for view `old_reserves` |
5390 |
-- |
5391 |
|
5392 |
CREATE VIEW `old_reserves` |
5393 |
AS |
5394 |
SELECT |
5395 |
`id` AS `reserve_id`, |
5396 |
`patron_id` AS `borrowernumber`, |
5397 |
`created_date` AS `reservedate`, |
5398 |
`biblio_id` AS `biblionumber`, |
5399 |
`pickup_library_id` AS `branchcode`, |
5400 |
`desk_id`, |
5401 |
CASE |
5402 |
WHEN `status` = 'cancelled' THEN |
5403 |
`completed_date` |
5404 |
ELSE |
5405 |
NULL |
5406 |
END AS `cancellationdate`, |
5407 |
`cancellation_reason`, |
5408 |
`notes` AS `reservenotes`, |
5409 |
`priority`, |
5410 |
CASE |
5411 |
WHEN `status` = 'fulfilled' THEN |
5412 |
'F' |
5413 |
ELSE |
5414 |
NULL |
5415 |
END AS `found`, |
5416 |
`timestamp`, |
5417 |
`item_id` AS `itemnumber`, |
5418 |
`waiting_date` AS `waitingdate`, |
5419 |
`expiration_date` AS `expirationdate`, |
5420 |
`lowest_priority` AS `lowestPriority`, |
5421 |
`suspended` AS `suspend`, |
5422 |
`suspended_until_date` AS `suspend_until`, |
5423 |
`item_type` AS `itemtype`, |
5424 |
`item_level` AS `item_level_hold`, |
5425 |
`non_priority` |
5426 |
FROM `holds` |
5427 |
WHERE completed=1; |
5329 |
|
5428 |
|
5330 |
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; |
5429 |
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; |
5331 |
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; |
5430 |
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; |
Lines 5335-5338
CREATE TABLE `zebraqueue` (
Link Here
|
5335 |
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; |
5434 |
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; |
5336 |
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; |
5435 |
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; |
5337 |
|
5436 |
|
5338 |
-- Dump completed on 2021-01-12 11:28:48 |
5437 |
-- Dump completed on 2021-01-27 18:32:36 |
5339 |
- |
|
|