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 5327-5332 CREATE TABLE `zebraqueue` ( Link Here
5327
/*!40101 SET character_set_client = @saved_cs_client */;
5327
/*!40101 SET character_set_client = @saved_cs_client */;
5328
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
5328
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
5329
5329
5330
DROP TABLE IF EXISTS `reading_suggestion`;
5331
/*!40101 SET @saved_cs_client     = @@character_set_client */;
5332
/*!40101 SET character_set_client = utf8 */;
5333
CREATE TABLE `reading_suggestion` (
5334
  `biblionumber` int(11) NOT NULL,
5335
  `biblionumber1` int(11) NOT NULL,
5336
  `biblionumber2` int(11) DEFAULT NULL,
5337
  `biblionumber3` int(11) DEFAULT NULL,
5338
  `biblionumber4` int(11) DEFAULT NULL,
5339
  `biblionumber5` int(11) DEFAULT NULL,
5340
  `biblionumber6` int(11) DEFAULT NULL,
5341
  `biblionumber7` int(11) DEFAULT NULL,
5342
  `biblionumber8` int(11) DEFAULT NULL,
5343
  `biblionumber9` int(11) DEFAULT NULL,
5344
  `biblionumber10` int(11) DEFAULT NULL,
5345
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp(),
5346
  PRIMARY KEY (`biblionumber`)
5347
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
5348
/*!40101 SET character_set_client = @saved_cs_client */;
5349
5330
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
5350
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
5331
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
5351
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
5332
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
5352
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
5333
- 

Return to bug 18618