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

(-)a/installer/data/mysql/atomicupdate/bug_32607.pl (+37 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "32607",
5
    description => "Add record_sources table",
6
    up          => sub {
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
10
        unless ( TableExists('record_sources') ) {
11
            $dbh->do(
12
                q{
13
                CREATE TABLE `record_sources` (
14
                  `record_source_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Primary key for the `record_sources` table',
15
                  `name` text NOT NULL COMMENT 'User defined name for the record source',
16
                  `patron_id` int(11) NULL DEFAULT NULL COMMENT 'Internal patron identifier',
17
                  `api_token` varchar(191) NULL DEFAULT NULL COMMENT 'Generated token for identifying the record source on API interactions',
18
                  PRIMARY KEY (`record_source_id`),
19
                  CONSTRAINT `record_source_fk_1` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE
20
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
21
            }
22
            );
23
24
            say $out "Added new table 'record_sources'";
25
        }
26
27
        $dbh->do(
28
            q{
29
            INSERT IGNORE INTO permissions (module_bit, code, description) VALUES
30
            ( 3, 'manage_record_sources', 'Manage record sources')
31
        }
32
        );
33
34
        say $out "Added new permission 'manage_record_sources'";
35
36
    },
37
};
(-)a/installer/data/mysql/kohastructure.sql (+15 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 `record_sources`
3472
--
3473
3474
DROP TABLE IF EXISTS `record_sources`;
3475
/*!40101 SET @saved_cs_client     = @@character_set_client */;
3476
/*!40101 SET character_set_client = utf8 */;
3477
CREATE TABLE `record_sources` (
3478
  `record_source_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Primary key for the `record_sources` table',
3479
  `name` text NOT NULL COMMENT 'User defined name for the record source',
3480
  `patron_id` int(11) NULL DEFAULT NULL COMMENT 'Internal patron identifier',
3481
  `api_token` varchar(191) NULL DEFAULT NULL COMMENT 'Generated token for identifying the record source on API interactions',
3482
  PRIMARY KEY (`record_source_id`),
3483
  CONSTRAINT `record_source_fk_1` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE
3484
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3470
--
3485
--
3471
-- Table structure for table `import_record_matches`
3486
-- Table structure for table `import_record_matches`
3472
--
3487
--
(-)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_record_sources', 'Manage record 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