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 3397-3402 CREATE TABLE `import_items` ( Link Here
3397
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3397
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3398
/*!40101 SET character_set_client = @saved_cs_client */;
3398
/*!40101 SET character_set_client = @saved_cs_client */;
3399
3399
3400
--
3401
-- Table structure for table `import_source`
3402
--
3403
3404
DROP TABLE IF EXISTS `import_source`;
3405
/*!40101 SET @saved_cs_client     = @@character_set_client */;
3406
/*!40101 SET character_set_client = utf8 */;
3407
CREATE TABLE `import_source` (
3408
  `import_source_id` int(11) NOT NULL AUTO_INCREMENT,
3409
  `name` text NOT NULL,
3410
  `patron_id` int(11) NOT NULL,
3411
  PRIMARY KEY (`import_source_id`),
3412
  CONSTRAINT `import_source_fk_1` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE
3413
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3400
--
3414
--
3401
-- Table structure for table `import_record_matches`
3415
-- Table structure for table `import_record_matches`
3402
--
3416
--
(-)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