Bugzilla – Attachment 177578 Details for
Bug 35761
Add an administration editor for FTP and SFTP servers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35761: DB schemas and atomicupdate
Bug-35761-DB-schemas-and-atomicupdate.patch (text/plain), 4.08 KB, created by
Jake Deery
on 2025-02-06 14:26:46 UTC
(
hide
)
Description:
Bug 35761: DB schemas and atomicupdate
Filename:
MIME Type:
Creator:
Jake Deery
Created:
2025-02-06 14:26:46 UTC
Size:
4.08 KB
patch
obsolete
>From ae380597c7b80a9224b0519a6ebc2530e45b6128 Mon Sep 17 00:00:00 2001 >From: Jake Deery <jake.deery@ptfs-europe.com> >Date: Thu, 6 Feb 2025 14:23:51 +0000 >Subject: [PATCH] Bug 35761: DB schemas and atomicupdate > >--- > .../bug_35761-add_SFTP_tables_and_perm.pl | 44 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 27 ++++++++++++ > 2 files changed, 71 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_35761-add_SFTP_tables_and_perm.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_35761-add_SFTP_tables_and_perm.pl b/installer/data/mysql/atomicupdate/bug_35761-add_SFTP_tables_and_perm.pl >new file mode 100644 >index 0000000000..45c9f0c9af >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_35761-add_SFTP_tables_and_perm.pl >@@ -0,0 +1,44 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "35761", >+ description => "Add new table and permission for generalised SFTP", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ $dbh->do( >+ q{ >+ INSERT IGNORE INTO permissions (module_bit, code, description) >+ VALUES (3, 'manage_sftp_servers', 'Manage FTP/SFTP servers configuration'); >+ } >+ ); >+ say $out "Added new manage_sftp_servers permission"; >+ >+ unless ( TableExists('sftp_servers') ) { >+ $dbh->do( >+ q { >+ CREATE TABLE `sftp_servers` ( >+ `id` int(11) NOT NULL AUTO_INCREMENT, >+ `name` varchar(80) NOT NULL, >+ `host` varchar(80) NOT NULL DEFAULT 'localhost', >+ `port` int(11) NOT NULL DEFAULT 22, >+ `transport` enum('ftp','sftp') NOT NULL DEFAULT 'sftp', >+ `passiv` tinyint(1) NOT NULL DEFAULT 1, >+ `user_name` varchar(80) DEFAULT NULL, >+ `password` mediumtext DEFAULT NULL, >+ `key_file` mediumtext DEFAULT NULL, >+ `auth_mode` enum('password','key_file','noauth') NOT NULL DEFAULT 'password', >+ `download_directory` mediumtext DEFAULT NULL, >+ `upload_directory` mediumtext DEFAULT NULL, >+ `status` varchar(32) DEFAULT NULL, >+ `debug` tinyint(1) NOT NULL DEFAULT 0, >+ PRIMARY KEY (`id`), >+ KEY `host_idx` (`host`) >+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; >+ } >+ ); >+ say $out "Added new sftp_servers table"; >+ } >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 3bf15c1007..6bdecc7b4d 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -5923,6 +5923,33 @@ CREATE TABLE `sessions` ( > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > /*!40101 SET character_set_client = @saved_cs_client */; > >+-- >+-- Table structure for table `sftp_servers` >+-- >+ >+DROP TABLE IF EXISTS `sftp_servers`; >+/*!40101 SET @saved_cs_client = @@character_set_client */; >+/*!40101 SET character_set_client = utf8 */; >+CREATE TABLE `sftp_servers` ( >+ `id` int(11) NOT NULL AUTO_INCREMENT, >+ `name` varchar(80) NOT NULL, >+ `host` varchar(80) NOT NULL DEFAULT 'localhost', >+ `port` int(11) NOT NULL DEFAULT 22, >+ `transport` enum('ftp','sftp') NOT NULL DEFAULT 'sftp', >+ `passiv` tinyint(1) NOT NULL DEFAULT 1, >+ `user_name` varchar(80) DEFAULT NULL, >+ `password` mediumtext DEFAULT NULL, >+ `key_file` mediumtext DEFAULT NULL, >+ `auth_mode` enum('password','key_file','noauth') NOT NULL DEFAULT 'password', >+ `download_directory` mediumtext DEFAULT NULL, >+ `upload_directory` mediumtext DEFAULT NULL, >+ `status` varchar(32) DEFAULT NULL, >+ `debug` tinyint(1) NOT NULL DEFAULT 0, >+ PRIMARY KEY (`id`), >+ KEY `host_idx` (`host`) >+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; >+/*!40101 SET character_set_client = @saved_cs_client */; >+ > -- > -- Table structure for table `sms_providers` > -- >-- >2.43.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35761
:
174933
|
174937
|
175030
|
175052
|
175067
|
175166
|
175608
|
175916
|
176429
|
176430
|
177577
| 177578