Lines 1865-1871
CREATE TABLE `club_holds_to_patron_holds` (
Link Here
|
1865 |
KEY `clubs_holds_paton_holds_ibfk_3` (`hold_id`), |
1865 |
KEY `clubs_holds_paton_holds_ibfk_3` (`hold_id`), |
1866 |
CONSTRAINT `clubs_holds_paton_holds_ibfk_1` FOREIGN KEY (`club_hold_id`) REFERENCES `club_holds` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, |
1866 |
CONSTRAINT `clubs_holds_paton_holds_ibfk_1` FOREIGN KEY (`club_hold_id`) REFERENCES `club_holds` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, |
1867 |
CONSTRAINT `clubs_holds_paton_holds_ibfk_2` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
1867 |
CONSTRAINT `clubs_holds_paton_holds_ibfk_2` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
1868 |
CONSTRAINT `clubs_holds_paton_holds_ibfk_3` FOREIGN KEY (`hold_id`) REFERENCES `reserves` (`reserve_id`) ON DELETE CASCADE ON UPDATE CASCADE |
1868 |
CONSTRAINT `clubs_holds_paton_holds_ibfk_3` FOREIGN KEY (`hold_id`) REFERENCES `holds` (`id`) ON DELETE CASCADE ON UPDATE CASCADE |
1869 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
1869 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
1870 |
/*!40101 SET character_set_client = @saved_cs_client */; |
1870 |
/*!40101 SET character_set_client = @saved_cs_client */; |
1871 |
|
1871 |
|
Lines 2645-2650
CREATE TABLE `hold_fill_targets` (
Link Here
|
2645 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
2645 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
2646 |
/*!40101 SET character_set_client = @saved_cs_client */; |
2646 |
/*!40101 SET character_set_client = @saved_cs_client */; |
2647 |
|
2647 |
|
|
|
2648 |
-- |
2649 |
-- Table structure for table `holds` |
2650 |
-- |
2651 |
|
2652 |
DROP TABLE IF EXISTS `holds`; |
2653 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
2654 |
/*!40101 SET character_set_client = utf8 */; |
2655 |
CREATE TABLE `holds` ( |
2656 |
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'internal hold identifier', |
2657 |
`patron_id` int(11) DEFAULT NULL COMMENT 'foreign key from the borrowers table defining which patron this hold is for', |
2658 |
`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', |
2659 |
`desk_id` int(11) DEFAULT NULL COMMENT 'foreign key from the desks table defining which desk the patron should pick this hold up at', |
2660 |
`created_date` date DEFAULT NULL COMMENT 'the date the hold was placed', |
2661 |
`biblio_id` int(11) DEFAULT NULL COMMENT 'foreign key from the biblio table defining which bib record this hold is on', |
2662 |
`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', |
2663 |
`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', |
2664 |
`item_level` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Is the hold was placed at item level', |
2665 |
`completed_date` date DEFAULT NULL COMMENT 'the date this hold was completed (fulfilled or cancelled)', |
2666 |
`notes` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'notes related to this hold', |
2667 |
`priority` smallint(6) NOT NULL DEFAULT 1 COMMENT 'where in the queue the patron sits', |
2668 |
`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'')', |
2669 |
`timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'the date and time this hold was last updated', |
2670 |
`waiting_date` date DEFAULT NULL COMMENT 'the date the item was marked as waiting for the patron at the library', |
2671 |
`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)', |
2672 |
`lowest_priority` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'if it was assigned the lowest priority', |
2673 |
`non_priority` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'if it was assigned no priority', |
2674 |
`suspended` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'If it is a non-priority hold', |
2675 |
`suspended_until_date` datetime DEFAULT NULL COMMENT 'Date until it is suspended', |
2676 |
`completed` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'If it has been completed (i.e. either ''fulfilled'' or ''cancelled'')', |
2677 |
`cancellation_reason` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'optional authorised value CANCELLATION_REASON', |
2678 |
PRIMARY KEY (`id`), |
2679 |
KEY `priority_status_idx` (`priority`,`status`), |
2680 |
KEY `patron_id` (`patron_id`), |
2681 |
KEY `biblio_id` (`biblio_id`), |
2682 |
KEY `item_id` (`item_id`), |
2683 |
KEY `pickup_library_id` (`pickup_library_id`), |
2684 |
KEY `item_type` (`item_type`), |
2685 |
KEY `holds_ibfk_2` (`desk_id`), |
2686 |
CONSTRAINT `holds_ibfk_1` FOREIGN KEY (`biblio_id`) REFERENCES `biblio` (`biblionumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
2687 |
CONSTRAINT `holds_ibfk_2` FOREIGN KEY (`desk_id`) REFERENCES `desks` (`desk_id`) ON DELETE SET NULL ON UPDATE CASCADE, |
2688 |
CONSTRAINT `holds_ibfk_3` FOREIGN KEY (`item_id`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
2689 |
CONSTRAINT `holds_ibfk_4` FOREIGN KEY (`item_type`) REFERENCES `itemtypes` (`itemtype`) ON DELETE SET NULL ON UPDATE CASCADE, |
2690 |
CONSTRAINT `holds_ibfk_5` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE, |
2691 |
CONSTRAINT `holds_ibfk_6` FOREIGN KEY (`pickup_library_id`) REFERENCES `branches` (`branchcode`) ON DELETE SET NULL ON UPDATE CASCADE |
2692 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
2693 |
/*!40101 SET character_set_client = @saved_cs_client */; |
2694 |
|
2648 |
-- |
2695 |
-- |
2649 |
-- Table structure for table `housebound_profile` |
2696 |
-- Table structure for table `housebound_profile` |
2650 |
-- |
2697 |
-- |
Lines 3862-3909
CREATE TABLE `old_issues` (
Link Here
|
3862 |
/*!40101 SET character_set_client = @saved_cs_client */; |
3909 |
/*!40101 SET character_set_client = @saved_cs_client */; |
3863 |
|
3910 |
|
3864 |
-- |
3911 |
-- |
3865 |
-- Table structure for table `old_reserves` |
3912 |
-- Temporary table structure for view `old_reserves` |
3866 |
-- |
3913 |
-- |
3867 |
|
3914 |
|
3868 |
DROP TABLE IF EXISTS `old_reserves`; |
3915 |
DROP TABLE IF EXISTS `old_reserves`; |
3869 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
3916 |
/*!50001 DROP VIEW IF EXISTS `old_reserves`*/; |
3870 |
/*!40101 SET character_set_client = utf8 */; |
3917 |
SET @saved_cs_client = @@character_set_client; |
3871 |
CREATE TABLE `old_reserves` ( |
3918 |
SET character_set_client = utf8; |
3872 |
`reserve_id` int(11) NOT NULL COMMENT 'primary key', |
3919 |
/*!50001 CREATE TABLE `old_reserves` ( |
3873 |
`borrowernumber` int(11) DEFAULT NULL COMMENT 'foreign key from the borrowers table defining which patron this hold is for', |
3920 |
`reserve_id` tinyint NOT NULL, |
3874 |
`reservedate` date DEFAULT NULL COMMENT 'the date the hold was places', |
3921 |
`borrowernumber` tinyint NOT NULL, |
3875 |
`biblionumber` int(11) DEFAULT NULL COMMENT 'foreign key from the biblio table defining which bib record this hold is on', |
3922 |
`reservedate` tinyint NOT NULL, |
3876 |
`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', |
3923 |
`biblionumber` tinyint NOT NULL, |
3877 |
`desk_id` int(11) DEFAULT NULL COMMENT 'foreign key from the desks table defining which desk the patron should pick this hold up at', |
3924 |
`branchcode` tinyint NOT NULL, |
3878 |
`notificationdate` date DEFAULT NULL COMMENT 'currently unused', |
3925 |
`desk_id` tinyint NOT NULL, |
3879 |
`reminderdate` date DEFAULT NULL COMMENT 'currently unused', |
3926 |
`cancellationdate` tinyint NOT NULL, |
3880 |
`cancellationdate` date DEFAULT NULL COMMENT 'the date this hold was cancelled', |
3927 |
`cancellation_reason` tinyint NOT NULL, |
3881 |
`cancellation_reason` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'optional authorised value CANCELLATION_REASON', |
3928 |
`reservenotes` tinyint NOT NULL, |
3882 |
`reservenotes` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'notes related to this hold', |
3929 |
`priority` tinyint NOT NULL, |
3883 |
`priority` smallint(6) NOT NULL DEFAULT 1 COMMENT 'where in the queue the patron sits', |
3930 |
`found` tinyint NOT NULL, |
3884 |
`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', |
3931 |
`timestamp` tinyint NOT NULL, |
3885 |
`timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'the date and time this hold was last updated', |
3932 |
`itemnumber` tinyint NOT NULL, |
3886 |
`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', |
3933 |
`waitingdate` tinyint NOT NULL, |
3887 |
`waitingdate` date DEFAULT NULL COMMENT 'the date the item was marked as waiting for the patron at the library', |
3934 |
`expirationdate` tinyint NOT NULL, |
3888 |
`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)', |
3935 |
`lowestPriority` tinyint NOT NULL, |
3889 |
`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)', |
3936 |
`suspend` tinyint NOT NULL, |
3890 |
`suspend` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'in this hold suspended (1 for yes, 0 for no)', |
3937 |
`suspend_until` tinyint NOT NULL, |
3891 |
`suspend_until` datetime DEFAULT NULL COMMENT 'the date this hold is suspended until (NULL for infinitely)', |
3938 |
`itemtype` tinyint NOT NULL, |
3892 |
`itemtype` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'If record level hold, the optional itemtype of the item the patron is requesting', |
3939 |
`item_level_hold` tinyint NOT NULL, |
3893 |
`item_level_hold` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Is the hpld placed at item level', |
3940 |
`non_priority` tinyint NOT NULL |
3894 |
`non_priority` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Is this a non priority hold', |
3941 |
) ENGINE=MyISAM */; |
3895 |
PRIMARY KEY (`reserve_id`), |
3942 |
SET character_set_client = @saved_cs_client; |
3896 |
KEY `old_reserves_borrowernumber` (`borrowernumber`), |
|
|
3897 |
KEY `old_reserves_biblionumber` (`biblionumber`), |
3898 |
KEY `old_reserves_itemnumber` (`itemnumber`), |
3899 |
KEY `old_reserves_branchcode` (`branchcode`), |
3900 |
KEY `old_reserves_itemtype` (`itemtype`), |
3901 |
CONSTRAINT `old_reserves_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE SET NULL, |
3902 |
CONSTRAINT `old_reserves_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE SET NULL ON UPDATE SET NULL, |
3903 |
CONSTRAINT `old_reserves_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE SET NULL, |
3904 |
CONSTRAINT `old_reserves_ibfk_4` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`) ON DELETE SET NULL ON UPDATE SET NULL |
3905 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
3906 |
/*!40101 SET character_set_client = @saved_cs_client */; |
3907 |
|
3943 |
|
3908 |
-- |
3944 |
-- |
3909 |
-- Table structure for table `opac_news` |
3945 |
-- Table structure for table `opac_news` |
Lines 4301-4352
CREATE TABLE `reports_dictionary` (
Link Here
|
4301 |
/*!40101 SET character_set_client = @saved_cs_client */; |
4337 |
/*!40101 SET character_set_client = @saved_cs_client */; |
4302 |
|
4338 |
|
4303 |
-- |
4339 |
-- |
4304 |
-- Table structure for table `reserves` |
4340 |
-- Temporary table structure for view `reserves` |
4305 |
-- |
4341 |
-- |
4306 |
|
4342 |
|
4307 |
DROP TABLE IF EXISTS `reserves`; |
4343 |
DROP TABLE IF EXISTS `reserves`; |
4308 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
4344 |
/*!50001 DROP VIEW IF EXISTS `reserves`*/; |
4309 |
/*!40101 SET character_set_client = utf8 */; |
4345 |
SET @saved_cs_client = @@character_set_client; |
4310 |
CREATE TABLE `reserves` ( |
4346 |
SET character_set_client = utf8; |
4311 |
`reserve_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key', |
4347 |
/*!50001 CREATE TABLE `reserves` ( |
4312 |
`borrowernumber` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the borrowers table defining which patron this hold is for', |
4348 |
`reserve_id` tinyint NOT NULL, |
4313 |
`reservedate` date DEFAULT NULL COMMENT 'the date the hold was placed', |
4349 |
`borrowernumber` tinyint NOT NULL, |
4314 |
`biblionumber` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the biblio table defining which bib record this hold is on', |
4350 |
`reservedate` tinyint NOT NULL, |
4315 |
`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', |
4351 |
`biblionumber` tinyint NOT NULL, |
4316 |
`desk_id` int(11) DEFAULT NULL COMMENT 'foreign key from the desks table defining which desk the patron should pick this hold up at', |
4352 |
`branchcode` tinyint NOT NULL, |
4317 |
`notificationdate` date DEFAULT NULL COMMENT 'currently unused', |
4353 |
`desk_id` tinyint NOT NULL, |
4318 |
`reminderdate` date DEFAULT NULL COMMENT 'currently unused', |
4354 |
`cancellationdate` tinyint NOT NULL, |
4319 |
`cancellationdate` date DEFAULT NULL COMMENT 'the date this hold was cancelled', |
4355 |
`cancellation_reason` tinyint NOT NULL, |
4320 |
`cancellation_reason` varchar(80) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'optional authorised value CANCELLATION_REASON', |
4356 |
`reservenotes` tinyint NOT NULL, |
4321 |
`reservenotes` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'notes related to this hold', |
4357 |
`priority` tinyint NOT NULL, |
4322 |
`priority` smallint(6) NOT NULL DEFAULT 1 COMMENT 'where in the queue the patron sits', |
4358 |
`found` tinyint NOT NULL, |
4323 |
`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', |
4359 |
`timestamp` tinyint NOT NULL, |
4324 |
`timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'the date and time this hold was last updated', |
4360 |
`itemnumber` tinyint NOT NULL, |
4325 |
`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', |
4361 |
`waitingdate` tinyint NOT NULL, |
4326 |
`waitingdate` date DEFAULT NULL COMMENT 'the date the item was marked as waiting for the patron at the library', |
4362 |
`expirationdate` tinyint NOT NULL, |
4327 |
`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)', |
4363 |
`lowestPriority` tinyint NOT NULL, |
4328 |
`lowestPriority` tinyint(1) NOT NULL DEFAULT 0, |
4364 |
`suspend` tinyint NOT NULL, |
4329 |
`suspend` tinyint(1) NOT NULL DEFAULT 0, |
4365 |
`suspend_until` tinyint NOT NULL, |
4330 |
`suspend_until` datetime DEFAULT NULL, |
4366 |
`itemtype` tinyint NOT NULL, |
4331 |
`itemtype` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'If record level hold, the optional itemtype of the item the patron is requesting', |
4367 |
`item_level_hold` tinyint NOT NULL, |
4332 |
`item_level_hold` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Is the hpld placed at item level', |
4368 |
`non_priority` tinyint NOT NULL |
4333 |
`non_priority` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Is this a non priority hold', |
4369 |
) ENGINE=MyISAM */; |
4334 |
PRIMARY KEY (`reserve_id`), |
4370 |
SET character_set_client = @saved_cs_client; |
4335 |
KEY `priorityfoundidx` (`priority`,`found`), |
|
|
4336 |
KEY `borrowernumber` (`borrowernumber`), |
4337 |
KEY `biblionumber` (`biblionumber`), |
4338 |
KEY `itemnumber` (`itemnumber`), |
4339 |
KEY `branchcode` (`branchcode`), |
4340 |
KEY `desk_id` (`desk_id`), |
4341 |
KEY `itemtype` (`itemtype`), |
4342 |
CONSTRAINT `reserves_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
4343 |
CONSTRAINT `reserves_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
4344 |
CONSTRAINT `reserves_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE, |
4345 |
CONSTRAINT `reserves_ibfk_4` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE, |
4346 |
CONSTRAINT `reserves_ibfk_5` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`) ON DELETE CASCADE ON UPDATE CASCADE, |
4347 |
CONSTRAINT `reserves_ibfk_6` FOREIGN KEY (`desk_id`) REFERENCES `desks` (`desk_id`) ON DELETE SET NULL ON UPDATE CASCADE |
4348 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
4349 |
/*!40101 SET character_set_client = @saved_cs_client */; |
4350 |
|
4371 |
|
4351 |
-- |
4372 |
-- |
4352 |
-- Table structure for table `return_claims` |
4373 |
-- Table structure for table `return_claims` |
Lines 5339-5345
CREATE TABLE `zebraqueue` (
Link Here
|
5339 |
KEY `zebraqueue_lookup` (`server`,`biblio_auth_number`,`operation`,`done`) |
5360 |
KEY `zebraqueue_lookup` (`server`,`biblio_auth_number`,`operation`,`done`) |
5340 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
5361 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
5341 |
/*!40101 SET character_set_client = @saved_cs_client */; |
5362 |
/*!40101 SET character_set_client = @saved_cs_client */; |
5342 |
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; |
5363 |
|
|
|
5364 |
-- |
5365 |
-- Table structure for table `reserves` |
5366 |
-- |
5367 |
|
5368 |
CREATE VIEW `reserves` |
5369 |
AS |
5370 |
SELECT |
5371 |
`id` AS `reserve_id`, |
5372 |
`patron_id` AS `borrowernumber`, |
5373 |
`created_date` AS `reservedate`, |
5374 |
`biblio_id` AS `biblionumber`, |
5375 |
`pickup_library_id` AS `branchcode`, |
5376 |
`desk_id`, |
5377 |
NULL AS `cancellationdate`, |
5378 |
`cancellation_reason`, |
5379 |
`notes` AS `reservenotes`, |
5380 |
`priority`, |
5381 |
CASE |
5382 |
when `status` = 'waiting' then |
5383 |
'W' |
5384 |
when `status` = 'in_transit' then |
5385 |
'T' |
5386 |
else |
5387 |
NULL |
5388 |
END AS `found`, |
5389 |
`timestamp`, |
5390 |
`item_id` AS `itemnumber`, |
5391 |
`waiting_date` AS `waitingdate`, |
5392 |
`expiration_date` AS `expirationdate`, |
5393 |
`lowest_priority` AS `lowestPriority`, |
5394 |
`suspended` AS `suspend`, |
5395 |
`suspended_until_date` AS `suspend_until`, |
5396 |
`item_type` AS `itemtype`, |
5397 |
`item_level` AS `item_level_hold`, |
5398 |
`non_priority` |
5399 |
FROM `holds` |
5400 |
WHERE completed=0; |
5401 |
|
5402 |
-- |
5403 |
-- Table structure for view `old_reserves` |
5404 |
-- |
5405 |
|
5406 |
CREATE VIEW `old_reserves` |
5407 |
AS |
5408 |
SELECT |
5409 |
`id` AS `reserve_id`, |
5410 |
`patron_id` AS `borrowernumber`, |
5411 |
`created_date` AS `reservedate`, |
5412 |
`biblio_id` AS `biblionumber`, |
5413 |
`pickup_library_id` AS `branchcode`, |
5414 |
`desk_id`, |
5415 |
CASE |
5416 |
WHEN `status` = 'cancelled' THEN |
5417 |
`completed_date` |
5418 |
ELSE |
5419 |
NULL |
5420 |
END AS `cancellationdate`, |
5421 |
`cancellation_reason`, |
5422 |
`notes` AS `reservenotes`, |
5423 |
`priority`, |
5424 |
CASE |
5425 |
WHEN `status` = 'fulfilled' THEN |
5426 |
'F' |
5427 |
ELSE |
5428 |
NULL |
5429 |
END AS `found`, |
5430 |
`timestamp`, |
5431 |
`item_id` AS `itemnumber`, |
5432 |
`waiting_date` AS `waitingdate`, |
5433 |
`expiration_date` AS `expirationdate`, |
5434 |
`lowest_priority` AS `lowestPriority`, |
5435 |
`suspended` AS `suspend`, |
5436 |
`suspended_until_date` AS `suspend_until`, |
5437 |
`item_type` AS `itemtype`, |
5438 |
`item_level` AS `item_level_hold`, |
5439 |
`non_priority` |
5440 |
FROM `holds` |
5441 |
WHERE completed=1; |
5343 |
|
5442 |
|
5344 |
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; |
5443 |
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; |
5345 |
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; |
5444 |
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; |
5346 |
- |
|
|