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

(-)a/installer/data/mysql/atomicupdate/bug_18618-add_table_reading_pairs.pl (+28 lines)
Line 0 Link Here
1
use Modern::Perl;
2
 
3
return {
4
    bug_number => "18618",
5
    description => "Add new table reading_suggestions",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        # Creating a column by suggestion is a design choice made to maximise speed
10
        $dbh->do(q{
11
            CREATE TABLE IF NOT EXISTS `reading_suggestion` (
12
              `biblionumber` int(11) NOT NULL,
13
              `biblionumber1` int(11) NOT NULL,
14
              `biblionumber2` int(11) DEFAULT NULL,
15
              `biblionumber3` int(11) DEFAULT NULL,
16
              `biblionumber4` int(11) DEFAULT NULL,
17
              `biblionumber5` int(11) DEFAULT NULL,
18
              `biblionumber6` int(11) DEFAULT NULL,
19
              `biblionumber7` int(11) DEFAULT NULL,
20
              `biblionumber8` int(11) DEFAULT NULL,
21
              `biblionumber9` int(11) DEFAULT NULL,
22
              `biblionumber10` int(11) DEFAULT NULL,
23
              `timestamp` timestamp NOT NULL DEFAULT current_timestamp(),
24
              PRIMARY KEY (`biblionumber`)
25
            ) 
26
         });
27
    },
28
};
(-)a/installer/data/mysql/atomicupdate/mana_add_table_reading_pairs.sql (-16 lines)
Lines 1-16 Link Here
1
-- biblionumber1 not null otherwise the data is useless
2
CREATE TABLE `reading_suggestion` (
3
  `biblionumber` int(11) NOT NULL,
4
  `biblionumber1` int(11) NOT NULL,
5
  `biblionumber2` int(11) DEFAULT NULL,
6
  `biblionumber3` int(11) DEFAULT NULL,
7
  `biblionumber4` int(11) DEFAULT NULL,
8
  `biblionumber5` int(11) DEFAULT NULL,
9
  `biblionumber6` int(11) DEFAULT NULL,
10
  `biblionumber7` int(11) DEFAULT NULL,
11
  `biblionumber8` int(11) DEFAULT NULL,
12
  `biblionumber9` int(11) DEFAULT NULL,
13
  `biblionumber10` int(11) DEFAULT NULL,
14
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
15
  PRIMARY KEY (`biblionumber`)
16
);
(-)a/installer/data/mysql/kohastructure.sql (-1 / +20 lines)
Lines 5361-5366 CREATE TABLE `zebraqueue` ( Link Here
5361
/*!40101 SET character_set_client = @saved_cs_client */;
5361
/*!40101 SET character_set_client = @saved_cs_client */;
5362
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
5362
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
5363
5363
5364
DROP TABLE IF EXISTS `reading_suggestion`;
5365
/*!40101 SET @saved_cs_client     = @@character_set_client */;
5366
/*!40101 SET character_set_client = utf8 */;
5367
CREATE TABLE `reading_suggestion` (
5368
  `biblionumber` int(11) NOT NULL,
5369
  `biblionumber1` int(11) NOT NULL,
5370
  `biblionumber2` int(11) DEFAULT NULL,
5371
  `biblionumber3` int(11) DEFAULT NULL,
5372
  `biblionumber4` int(11) DEFAULT NULL,
5373
  `biblionumber5` int(11) DEFAULT NULL,
5374
  `biblionumber6` int(11) DEFAULT NULL,
5375
  `biblionumber7` int(11) DEFAULT NULL,
5376
  `biblionumber8` int(11) DEFAULT NULL,
5377
  `biblionumber9` int(11) DEFAULT NULL,
5378
  `biblionumber10` int(11) DEFAULT NULL,
5379
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp(),
5380
  PRIMARY KEY (`biblionumber`)
5381
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
5382
/*!40101 SET character_set_client = @saved_cs_client */;
5383
5364
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
5384
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
5365
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
5385
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
5366
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
5386
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
5367
- 

Return to bug 18618