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

(-)a/installer/data/mysql/atomicupdate/bug_35724-add_upload_port_and_download_port_columns.pl (+26 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "35724",
5
    description => "Add new fields to EDI accounts for librarians to configure non-standard EDI SFTP port numbers",
6
    up => sub {
7
        my ($args) = @_; 
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
10
        if( !column_exists( 'vendor_edi_accounts', 'upload_port' ) ) { 
11
          $dbh->do(q{
12
              ALTER TABLE vendor_edi_accounts ADD COLUMN `upload_port` varchar(40) DEFAULT '22' AFTER `password`
13
          });
14
15
          say $out "Added column 'vendor_edi_accounts.upload_port'";
16
        }
17
18
        if( !column_exists( 'vendor_edi_accounts', 'download_port' ) ) {
19
          $dbh->do(q{
20
              ALTER TABLE vendor_edi_accounts ADD COLUMN `download_port` varchar(40) DEFAULT '22' AFTER `password`
21
          });
22
23
          say $out "Added column 'vendor_edi_accounts.download_port'";
24
        }
25
    },
26
};
(-)a/installer/data/mysql/kohastructure.sql (-1 / +2 lines)
Lines 6427-6432 CREATE TABLE `vendor_edi_accounts` ( Link Here
6427
  `host` varchar(40) DEFAULT NULL,
6427
  `host` varchar(40) DEFAULT NULL,
6428
  `username` varchar(40) DEFAULT NULL,
6428
  `username` varchar(40) DEFAULT NULL,
6429
  `password` mediumtext DEFAULT NULL,
6429
  `password` mediumtext DEFAULT NULL,
6430
  `upload_port` varchar(40) DEFAULT NULL,
6431
  `download_port` varchar(40) DEFAULT NULL,
6430
  `last_activity` date DEFAULT NULL,
6432
  `last_activity` date DEFAULT NULL,
6431
  `vendor_id` int(11) DEFAULT NULL,
6433
  `vendor_id` int(11) DEFAULT NULL,
6432
  `download_directory` mediumtext DEFAULT NULL,
6434
  `download_directory` mediumtext DEFAULT NULL,
6433
- 

Return to bug 35724