Bug 22456: Add cancellation request table
This patch adds a new table, for storing holds cancellation requests, and managing them afterwards. The *hold_id* attribute is not made a FK on the reserves table because of the old_reserves thing we still do (see bug 25260 for a discussion about it). Sponsored-by: Montgomery County Public Libraries Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
c02dae9380
commit
a2dbdc6fc4
|
|
@ -0,0 +1,21 @@
|
|||
use Modern::Perl;
|
||||
|
||||
return {
|
||||
bug_number => "22456",
|
||||
description => "Allow cancelling waiting holds",
|
||||
up => sub {
|
||||
my ($args) = @_;
|
||||
my ($dbh, $out) = @$args{qw(dbh out)};
|
||||
|
||||
unless ( TableExists( 'hold_cancellation_requests' ) ) {
|
||||
$dbh->do(q{
|
||||
CREATE TABLE `hold_cancellation_requests` (
|
||||
`hold_cancellation_request_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Unique ID of the cancellation request',
|
||||
`hold_id` int(11) NOT null COMMENT 'ID of the hold',
|
||||
`creation_date` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Time and date the cancellation request was created',
|
||||
PRIMARY KEY (`hold_cancellation_request_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
@ -4564,6 +4564,21 @@ CREATE TABLE `reserves` (
|
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `hold_cancellation_requests`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `hold_cancellation_requests`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `hold_cancellation_requests` (
|
||||
`hold_cancellation_request_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Unique ID of the cancellation request',
|
||||
`hold_id` int(11) NOT null COMMENT 'ID of the hold',
|
||||
`creation_date` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Time and date the cancellation request was created',
|
||||
PRIMARY KEY (`hold_cancellation_request_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `return_claims`
|
||||
--
|
||||
|
|
|
|||
Loading…
Reference in New Issue