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 3467-3472 CREATE TABLE `import_items` ( Link Here
3467
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3467
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3468
/*!40101 SET character_set_client = @saved_cs_client */;
3468
/*!40101 SET character_set_client = @saved_cs_client */;
3469
3469
3470
--
3471
-- Table structure for table `import_source`
3472
--
3473
3474
DROP TABLE IF EXISTS `import_source`;
3475
/*!40101 SET @saved_cs_client     = @@character_set_client */;
3476
/*!40101 SET character_set_client = utf8 */;
3477
CREATE TABLE `import_source` (
3478
  `import_source_id` int(11) NOT NULL AUTO_INCREMENT,
3479
  `name` text NOT NULL,
3480
  `patron_id` int(11) NOT NULL,
3481
  PRIMARY KEY (`import_source_id`),
3482
  CONSTRAINT `import_source_fk_1` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE
3483
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3470
--
3484
--
3471
-- Table structure for table `import_record_matches`
3485
-- Table structure for table `import_record_matches`
3472
--
3486
--
(-)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 identity providers'),
44
   ( 3, 'manage_identity_providers', 'Manage identity 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