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

(-)a/installer/data/mysql/atomicupdate/bug_32607.pl (+32 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "32607",
5
    description => "Add import_source table",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        # Do you stuffs here
10
        if(!TableExists('import_source')) {
11
            $dbh->do(q{
12
                CREATE TABLE `import_source` (
13
                    `import_source_id` int(11) NOT NULL AUTO_INCREMENT,
14
                    `name` text NOT NULL,
15
                    `patron_id` int(11) NOT NULL,
16
                    PRIMARY KEY (`import_source_id`),
17
                    CONSTRAINT `import_source_fk_1` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE
18
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
19
            });
20
        }
21
22
        say $out "Added new import_source table";
23
24
        $dbh->do(q{
25
            INSERT IGNORE INTO permissions (module_bit, code, description) VALUES
26
            ( 3, 'manage_import_sources', 'Manage import sources')
27
        });
28
29
        say $out "Added new manage_import_sources permission";
30
31
    },
32
};
(-)a/installer/data/mysql/kohastructure.sql (+14 lines)
Lines 3391-3396 CREATE TABLE `import_items` ( Link Here
3391
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3391
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3392
/*!40101 SET character_set_client = @saved_cs_client */;
3392
/*!40101 SET character_set_client = @saved_cs_client */;
3393
3393
3394
--
3395
-- Table structure for table `import_source`
3396
--
3397
3398
DROP TABLE IF EXISTS `import_source`;
3399
/*!40101 SET @saved_cs_client     = @@character_set_client */;
3400
/*!40101 SET character_set_client = utf8 */;
3401
CREATE TABLE `import_source` (
3402
  `import_source_id` int(11) NOT NULL AUTO_INCREMENT,
3403
  `name` text NOT NULL,
3404
  `patron_id` int(11) NOT NULL,
3405
  PRIMARY KEY (`import_source_id`),
3406
  CONSTRAINT `import_source_fk_1` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE
3407
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3394
--
3408
--
3395
-- Table structure for table `import_record_matches`
3409
-- Table structure for table `import_record_matches`
3396
--
3410
--
(-)a/installer/data/mysql/mandatory/userpermissions.sql (-1 / +1 lines)
Lines 42-47 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
42
   ( 3, 'manage_curbside_pickups', 'Manage curbside pickups'),
42
   ( 3, 'manage_curbside_pickups', 'Manage curbside pickups'),
43
   ( 3, 'manage_search_filters', 'Manage custom search filters'),
43
   ( 3, 'manage_search_filters', 'Manage custom search filters'),
44
   ( 3, 'manage_identity_providers', 'Manage authentication providers'),
44
   ( 3, 'manage_identity_providers', 'Manage authentication providers'),
45
   ( 3, 'manage_import_sources', 'Manage import sources'),
45
   ( 4, 'delete_borrowers', 'Delete patrons'),
46
   ( 4, 'delete_borrowers', 'Delete patrons'),
46
   ( 4, 'edit_borrowers', 'Add, modify and view patron information'),
47
   ( 4, 'edit_borrowers', 'Add, modify and view patron information'),
47
   ( 4, 'view_borrower_infos_from_any_libraries', 'View patron infos from any libraries'),
48
   ( 4, 'view_borrower_infos_from_any_libraries', 'View patron infos from any libraries'),
48
- 

Return to bug 32607