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

(-)a/installer/data/mysql/atomicupdate/bug_33104.pl (+42 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "33104",
5
    description => "Add vendor interfaces",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        unless ( TableExists('aqbookseller_interfaces') ) {
10
            $dbh->do(q{
11
                CREATE TABLE `aqbookseller_interfaces` (
12
                  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key and unique identifier assigned by Koha',
13
                  `vendor_id` int(11) NOT NULL COMMENT 'link to the vendor',
14
                  `type` varchar(80) DEFAULT NULL COMMENT "type of the interface, authorised value VENDOR_INTERFACE_TYPE",
15
                  `name` varchar(255) NOT NULL COMMENT 'name of the interface',
16
                  `uri` mediumtext DEFAULT NULL COMMENT 'uri of the interface',
17
                  `login` varchar(255) DEFAULT NULL COMMENT 'login',
18
                  `password` mediumtext DEFAULT NULL COMMENT 'hashed password',
19
                  `account_email` mediumtext DEFAULT NULL COMMENT 'account email',
20
                  `notes` longtext DEFAULT NULL COMMENT 'notes',
21
                  PRIMARY KEY (`id`),
22
                  CONSTRAINT `aqbookseller_interfaces_ibfk_1` FOREIGN KEY (`vendor_id`) REFERENCES `aqbooksellers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
23
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
24
            });
25
            say $out "Added new table 'aqbookseller_interfaces'";
26
        }
27
28
        $dbh->do(q{
29
            INSERT IGNORE INTO authorised_value_categories (category_name, is_system)
30
            VALUES
31
                ('VENDOR_INTERFACE_TYPE', 1)
32
        });
33
        $dbh->do(q{
34
            INSERT IGNORE INTO authorised_values (category, authorised_value, lib)
35
            VALUES
36
                ('VENDOR_INTERFACE_TYPE', 'ADMIN', 'Admin'),
37
                ('VENDOR_INTERFACE_TYPE', 'ORDERS', 'Orders'),
38
                ('VENDOR_INTERFACE_TYPE', 'REPORTS', 'Reports')
39
        });
40
        say $out "Added new authorised value category 'VENDOR_INTERFACE_TYPE'";
41
    },
42
};
(-)a/installer/data/mysql/en/mandatory/auth_values.yml (+12 lines)
Lines 258-263 tables: Link Here
258
          authorised_value: "audiobook"
258
          authorised_value: "audiobook"
259
          lib: "Audiobook"
259
          lib: "Audiobook"
260
260
261
        - category: "VENDOR_INTERFACE_TYPE"
262
          authorised_value: "ADMIN"
263
          lib: "Admin"
264
265
        - category: "VENDOR_INTERFACE_TYPE"
266
          authorised_value: "ORDERS"
267
          lib: "Orders"
268
269
        - category: "VENDOR_INTERFACE_TYPE"
270
          authorised_value: "REPORTS"
271
          lib: "Reports"
272
261
  # Country codes
273
  # Country codes
262
  - authorised_values:
274
  - authorised_values:
263
      translatable: [ lib, lib_opac ]
275
      translatable: [ lib, lib_opac ]
(-)a/installer/data/mysql/kohastructure.sql (+22 lines)
Lines 440-445 CREATE TABLE `aqbookseller_aliases` ( Link Here
440
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
440
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
441
/*!40101 SET character_set_client = @saved_cs_client */;
441
/*!40101 SET character_set_client = @saved_cs_client */;
442
442
443
--
444
-- Table structure for table `aqbookseller_interfaces`
445
--
446
447
DROP TABLE IF EXISTS `aqbookseller_interfaces`;
448
/*!40101 SET @saved_cs_client     = @@character_set_client */;
449
/*!40101 SET character_set_client = utf8 */;
450
CREATE TABLE `aqbookseller_interfaces` (
451
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key and unique identifier assigned by Koha',
452
  `vendor_id` int(11) NOT NULL COMMENT 'link to the vendor',
453
  `type` varchar(80) DEFAULT NULL COMMENT "type of the interface, authorised value VENDOR_INTERFACE_TYPE",
454
  `name` varchar(255) NOT NULL COMMENT 'name of the interface',
455
  `uri` mediumtext DEFAULT NULL COMMENT 'uri of the interface',
456
  `login` varchar(255) DEFAULT NULL COMMENT 'login',
457
  `password` mediumtext DEFAULT NULL COMMENT 'hashed password',
458
  `account_email` mediumtext DEFAULT NULL COMMENT 'account email',
459
  `notes` longtext DEFAULT NULL COMMENT 'notes',
460
  PRIMARY KEY (`id`),
461
  CONSTRAINT `aqbookseller_interfaces_ibfk_1` FOREIGN KEY (`vendor_id`) REFERENCES `aqbooksellers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
462
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
463
/*!40101 SET character_set_client = @saved_cs_client */;
464
443
--
465
--
444
-- Table structure for table `aqbudgetborrowers`
466
-- Table structure for table `aqbudgetborrowers`
445
--
467
--
(-)a/installer/data/mysql/mandatory/auth_val_cat.sql (-1 / +2 lines)
Lines 20-26 INSERT IGNORE INTO authorised_value_categories( category_name, is_system ) Link Here
20
    ('HOLD_CANCELLATION', 0),
20
    ('HOLD_CANCELLATION', 0),
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
25
25
INSERT IGNORE INTO authorised_value_categories( category_name, is_system )
26
INSERT IGNORE INTO authorised_value_categories( category_name, is_system )
26
    VALUES
27
    VALUES
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt (-1 / +2 lines)
Lines 587-592 Link Here
587
            <p>Categories to be assigned to file uploads. Without a category an upload is considered temporary and may be removed during automated cleanup.</p>
587
            <p>Categories to be assigned to file uploads. Without a category an upload is considered temporary and may be removed during automated cleanup.</p>
588
        [% CASE 'VENDOR_TYPE' %]
588
        [% CASE 'VENDOR_TYPE' %]
589
            <p>Values that can be entered to fill in the 'Vendor type' field in the acquisitions module, that can be used for statistical purposes</p>
589
            <p>Values that can be entered to fill in the 'Vendor type' field in the acquisitions module, that can be used for statistical purposes</p>
590
        [% CASE 'VENDOR_INTERFACE_TYPE' %]
591
            <p>Values that can be entered to fill in the 'Vendor interface type' field in the acquisitions module</p>
590
        [% CASE 'WITHDRAWN' %]
592
        [% CASE 'WITHDRAWN' %]
591
            <p>Description of a withdrawn item (appears when adding or editing an item)</p>
593
            <p>Description of a withdrawn item (appears when adding or editing an item)</p>
592
        [% CASE 'YES_NO' %]
594
        [% CASE 'YES_NO' %]
593
- 

Return to bug 33104