View | Details | Raw Unified | Return to bug 34686
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_34686_reserve_id.pl (+22 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "34686",
5
    description => "Add reserve_id to tmp_holdsqueue table",
6
    up          => sub {
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
10
        unless ( column_exists( 'tmp_holdsqueue', 'reserve_id' ) ) {
11
            $dbh->do(
12
                q{
13
                ALTER TABLE tmp_holdsqueue ADD reserve_id int(11) NULL DEFAULT NULL FIRST
14
            }
15
            );
16
            $dbh->do(
17
                q{ ALTER TABLE tmp_holdsqueue ADD CONSTRAINT `tmp_holdsqueue_ibfk_4` FOREIGN KEY (`reserve_id`) REFERENCES `reserves` (`reserve_id`) ON DELETE CASCADE ON UPDATE CASCADE }
18
            );
19
            say $out "Added column 'tmp_holdsqueue.reserve_id'";
20
        }
21
    },
22
};
(-)a/installer/data/mysql/kohastructure.sql (-2 / +4 lines)
Lines 5869-5874 DROP TABLE IF EXISTS `tmp_holdsqueue`; Link Here
5869
/*!40101 SET @saved_cs_client     = @@character_set_client */;
5869
/*!40101 SET @saved_cs_client     = @@character_set_client */;
5870
/*!40101 SET character_set_client = utf8 */;
5870
/*!40101 SET character_set_client = utf8 */;
5871
CREATE TABLE `tmp_holdsqueue` (
5871
CREATE TABLE `tmp_holdsqueue` (
5872
  `reserve_id` int(11) DEFAULT NULL,
5872
  `biblionumber` int(11) DEFAULT NULL,
5873
  `biblionumber` int(11) DEFAULT NULL,
5873
  `itemnumber` int(11) NOT NULL,
5874
  `itemnumber` int(11) NOT NULL,
5874
  `barcode` varchar(20) DEFAULT NULL,
5875
  `barcode` varchar(20) DEFAULT NULL,
Lines 5889-5897 CREATE TABLE `tmp_holdsqueue` ( Link Here
5889
  KEY `tmp_holdsqueue_ibfk_1` (`itemnumber`),
5890
  KEY `tmp_holdsqueue_ibfk_1` (`itemnumber`),
5890
  KEY `tmp_holdsqueue_ibfk_2` (`biblionumber`),
5891
  KEY `tmp_holdsqueue_ibfk_2` (`biblionumber`),
5891
  KEY `tmp_holdsqueue_ibfk_3` (`borrowernumber`),
5892
  KEY `tmp_holdsqueue_ibfk_3` (`borrowernumber`),
5893
  KEY `tmp_holdsqueue_ibfk_4` (`reserve_id`),
5892
  CONSTRAINT `tmp_holdsqueue_ibfk_1` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
5894
  CONSTRAINT `tmp_holdsqueue_ibfk_1` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE,
5893
  CONSTRAINT `tmp_holdsqueue_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE,
5895
  CONSTRAINT `tmp_holdsqueue_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE,
5894
  CONSTRAINT `tmp_holdsqueue_ibfk_3` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE
5896
  CONSTRAINT `tmp_holdsqueue_ibfk_3` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE,
5897
  CONSTRAINT `tmp_holdsqueue_ibfk_4` FOREIGN KEY (`reserve_id`) REFERENCES `reserves` (`reserve_id`) ON DELETE CASCADE ON UPDATE CASCADE
5895
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
5898
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
5896
/*!40101 SET character_set_client = @saved_cs_client */;
5899
/*!40101 SET character_set_client = @saved_cs_client */;
5897
5900
5898
- 

Return to bug 34686