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

(-)a/installer/data/mysql/atomicupdate/bug_33103.pl (+22 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "33103",
5
    description => "Add vendor aliases",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        unless ( TableExists('aqbookseller_aliases') ) {
10
            $dbh->do(q{
11
                CREATE TABLE `aqbookseller_aliases` (
12
                  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key and unique identifier assigned by Koha',
13
                  `vendor_id` int(11) NOT NULL COMMENT 'link to the vendor',
14
                  `alias` varchar(255) NOT NULL COMMENT "the alias",
15
                  PRIMARY KEY (`id`),
16
                  CONSTRAINT `aqbookseller_aliases_ibfk_1` FOREIGN KEY (`vendor_id`) REFERENCES `aqbooksellers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
17
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
18
            });
19
            say $out "Added new table 'aqbookseller_aliases'";
20
        }
21
    },
22
};
(-)a/installer/data/mysql/kohastructure.sql (-1 / +16 lines)
Lines 423-428 CREATE TABLE `aqbooksellers` ( Link Here
423
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
423
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
424
/*!40101 SET character_set_client = @saved_cs_client */;
424
/*!40101 SET character_set_client = @saved_cs_client */;
425
425
426
--
427
-- Table structure for table `aqbookseller_aliases`
428
--
429
430
DROP TABLE IF EXISTS `aqbookseller_aliases`;
431
/*!40101 SET @saved_cs_client     = @@character_set_client */;
432
/*!40101 SET character_set_client = utf8 */;
433
CREATE TABLE `aqbookseller_aliases` (
434
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key and unique identifier assigned by Koha',
435
  `vendor_id` int(11) NOT NULL COMMENT 'link to the vendor',
436
  `alias` varchar(255) NOT NULL COMMENT "the alias",
437
  PRIMARY KEY (`id`),
438
  CONSTRAINT `aqbookseller_aliases_ibfk_1` FOREIGN KEY (`vendor_id`) REFERENCES `aqbooksellers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
439
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
440
/*!40101 SET character_set_client = @saved_cs_client */;
441
426
--
442
--
427
-- Table structure for table `aqbudgetborrowers`
443
-- Table structure for table `aqbudgetborrowers`
428
--
444
--
429
- 

Return to bug 33103