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

(-)a/installer/data/mysql/atomicupdate/bug_33105.pl (+45 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "33105",
5
    description => "A vendor issues",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        # Do you stuffs here
10
        unless (TableExists('aqbookseller_issues')) {
11
            $dbh->do(q{
12
                CREATE TABLE `aqbookseller_issues` (
13
                  `issue_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key and unique identifier assigned by Koha',
14
                  `vendor_id` int(11) NOT NULL COMMENT 'link to the vendor',
15
                  `type` varchar(80) DEFAULT NULL COMMENT "type of the issue, authorised value VENDOR_ISSUE_TYPE",
16
                  `started_on` date DEFAULT NULL COMMENT 'start of the issue',
17
                  `ended_on` date DEFAULT NULL COMMENT 'end of the issue',
18
                  `notes` longtext DEFAULT NULL COMMENT 'notes',
19
                  PRIMARY KEY (`issue_id`),
20
                  CONSTRAINT `aqbookseller_issues_ibfk_1` FOREIGN KEY (`vendor_id`) REFERENCES `aqbooksellers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
21
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
22
            });
23
            say $out "Added new table 'aqbookseller_issues'";
24
        }
25
26
        $dbh->do(q{
27
            INSERT IGNORE INTO permissions (module_bit, code, description) VALUES
28
            (11, 'issue_manage', 'Manage issues');
29
        });
30
        say $out "Added new permission 'acquisition.issue_manage'";
31
32
        $dbh->do(q{
33
            INSERT IGNORE INTO authorised_value_categories (category_name, is_system)
34
            VALUES
35
                ('VENDOR_ISSUE_TYPE', 1)
36
        });
37
        $dbh->do(q{
38
            INSERT IGNORE INTO authorised_values (category, authorised_value, lib)
39
            VALUES
40
                ('VENDOR_ISSUE_TYPE', 'MAINTENANCE', 'Maintenance'),
41
                ('VENDOR_ISSUE_TYPE', 'OUTAGE', 'Outage')
42
        });
43
        say $out "Added new authorised value category 'VENDOR_ISSUE_TYPE'";
44
    },
45
};
(-)a/installer/data/mysql/en/mandatory/auth_values.yml (+8 lines)
Lines 270-275 tables: Link Here
270
          authorised_value: "REPORTS"
270
          authorised_value: "REPORTS"
271
          lib: "Reports"
271
          lib: "Reports"
272
272
273
        - category: "VENDOR_ISSUE_TYPE"
274
          authorised_value: "MAINTENANCE"
275
          lib: "Maintenance"
276
277
        - category: "VENDOR_ISSUE_TYPE"
278
          authorised_value: "OUTAGE"
279
          lib: "Outage"
280
273
  # Country codes
281
  # Country codes
274
  - authorised_values:
282
  - authorised_values:
275
      translatable: [ lib, lib_opac ]
283
      translatable: [ lib, lib_opac ]
(-)a/installer/data/mysql/kohastructure.sql (+19 lines)
Lines 462-467 CREATE TABLE `aqbookseller_interfaces` ( Link Here
462
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
462
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
463
/*!40101 SET character_set_client = @saved_cs_client */;
463
/*!40101 SET character_set_client = @saved_cs_client */;
464
464
465
--
466
-- Table structure for table `aqbookseller_issues`
467
--
468
469
DROP TABLE IF EXISTS `aqbookseller_issues`;
470
/*!40101 SET @saved_cs_client     = @@character_set_client */;
471
/*!40101 SET character_set_client = utf8 */;
472
CREATE TABLE `aqbookseller_issues` (
473
  `issue_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key and unique identifier assigned by Koha',
474
  `vendor_id` int(11) NOT NULL COMMENT 'link to the vendor',
475
  `type` varchar(80) DEFAULT NULL COMMENT "type of the issue, authorised value VENDOR_ISSUE_TYPE",
476
  `started_on` date DEFAULT NULL COMMENT 'start of the issue',
477
  `ended_on` date DEFAULT NULL COMMENT 'end of the issue',
478
  `notes` longtext DEFAULT NULL COMMENT 'notes',
479
  PRIMARY KEY (`issue_id`),
480
  CONSTRAINT `aqbookseller_issues_ibfk_1` FOREIGN KEY (`vendor_id`) REFERENCES `aqbooksellers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
481
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
482
/*!40101 SET character_set_client = @saved_cs_client */;
483
465
--
484
--
466
-- Table structure for table `aqbudgetborrowers`
485
-- Table structure for table `aqbudgetborrowers`
467
--
486
--
(-)a/installer/data/mysql/mandatory/auth_val_cat.sql (-1 / +2 lines)
Lines 21-27 INSERT IGNORE INTO authorised_value_categories( category_name, is_system ) Link Here
21
    ('ROADTYPE', 0),
21
    ('ROADTYPE', 0),
22
    ('AR_CANCELLATION', 0),
22
    ('AR_CANCELLATION', 0),
23
    ('VENDOR_TYPE', 1),
23
    ('VENDOR_TYPE', 1),
24
    ('VENDOR_INTERFACE_TYPE', 1);
24
    ('VENDOR_INTERFACE_TYPE', 1),
25
    ('VENDOR_ISSUE_TYPE', 1);
25
26
26
INSERT IGNORE INTO authorised_value_categories( category_name, is_system )
27
INSERT IGNORE INTO authorised_value_categories( category_name, is_system )
27
    VALUES
28
    VALUES
(-)a/installer/data/mysql/mandatory/userpermissions.sql (-1 / +1 lines)
Lines 73-78 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
73
   (11, 'planning_manage', 'Manage budget plannings'),
73
   (11, 'planning_manage', 'Manage budget plannings'),
74
   (11, 'order_manage', 'Manage baskets and order lines'),
74
   (11, 'order_manage', 'Manage baskets and order lines'),
75
   (11, 'order_manage_all', 'Manage all baskets and order lines, regardless of restrictions on them'),
75
   (11, 'order_manage_all', 'Manage all baskets and order lines, regardless of restrictions on them'),
76
   (11, 'issue_manage', 'Manage issues');
76
   (11, 'group_manage', 'Manage basket groups'),
77
   (11, 'group_manage', 'Manage basket groups'),
77
   (11, 'order_receive', 'Receive orders and manage shipments'),
78
   (11, 'order_receive', 'Receive orders and manage shipments'),
78
   (11, 'budget_add_del', 'Add and delete funds (but can''t modify funds)'),
79
   (11, 'budget_add_del', 'Add and delete funds (but can''t modify funds)'),
79
- 

Return to bug 33105