Bugzilla – Attachment 186431 Details for
Bug 39190
Rework new (S)FTP classes to be polymorphic classes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39190: Rename id => file_transport_id and remove mapping
Bug-39190-Rename-id--filetransportid-and-remove-ma.patch (text/plain), 4.66 KB, created by
Tomás Cohen Arazi (tcohen)
on 2025-09-15 14:40:29 UTC
(
hide
)
Description:
Bug 39190: Rename id => file_transport_id and remove mapping
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2025-09-15 14:40:29 UTC
Size:
4.66 KB
patch
obsolete
>From a8ff6482108844dadf3b3927913157533e0fa11d Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Sat, 30 Aug 2025 12:29:55 -0300 >Subject: [PATCH] Bug 39190: Rename id => file_transport_id and remove mapping > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Schema/Result/FileTransport.pm | 12 ++++++------ > .../bug_35761-add_SFTP_tables_and_perm.pl | 4 ++-- > installer/data/mysql/kohastructure.sql | 4 ++-- > t/db_dependent/Koha/File/Transports.t | 3 ++- > 4 files changed, 12 insertions(+), 11 deletions(-) > >diff --git a/Koha/Schema/Result/FileTransport.pm b/Koha/Schema/Result/FileTransport.pm >index 8705d8ff326..9baff02b86e 100644 >--- a/Koha/Schema/Result/FileTransport.pm >+++ b/Koha/Schema/Result/FileTransport.pm >@@ -23,7 +23,7 @@ __PACKAGE__->table("file_transports"); > > =head1 ACCESSORS > >-=head2 id >+=head2 file_transport_id > > data_type: 'integer' > is_auto_increment: 1 >@@ -108,7 +108,7 @@ __PACKAGE__->table("file_transports"); > =cut > > __PACKAGE__->add_columns( >- "id", >+ "file_transport_id", > { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, > "name", > { data_type => "varchar", is_nullable => 0, size => 80 }, >@@ -157,17 +157,17 @@ __PACKAGE__->add_columns( > > =over 4 > >-=item * L</id> >+=item * L</file_transport_id> > > =back > > =cut > >-__PACKAGE__->set_primary_key("id"); >+__PACKAGE__->set_primary_key("file_transport_id"); > > >-# Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-08-29 20:23:47 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:eeoKreXE9wfz12s4ENo5Tg >+# Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-09-15 14:28:35 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Mpw0xCAH2Jmoxv3V9fHJRw > > __PACKAGE__->add_columns( > '+passive' => { is_boolean => 1 }, >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 >index 653254df040..43e18e162d2 100755 >--- 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 >@@ -19,7 +19,7 @@ return { > $dbh->do( > q { > CREATE TABLE `file_transports` ( >- `id` int(11) NOT NULL AUTO_INCREMENT, >+ `file_transport_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, >@@ -33,7 +33,7 @@ return { > `upload_directory` mediumtext DEFAULT NULL, > `status` longtext DEFAULT NULL, > `debug` tinyint(1) NOT NULL DEFAULT 0, >- PRIMARY KEY (`id`), >+ PRIMARY KEY (`file_transport_id`), > KEY `host_idx` (`host`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > } >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 913df47cb1b..948683dc43b 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -5996,7 +5996,7 @@ DROP TABLE IF EXISTS `file_transports`; > /*!40101 SET @saved_cs_client = @@character_set_client */; > /*!40101 SET character_set_client = utf8 */; > CREATE TABLE `file_transports` ( >- `id` int(11) NOT NULL AUTO_INCREMENT, >+ `file_transport_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, >@@ -6010,7 +6010,7 @@ CREATE TABLE `file_transports` ( > `upload_directory` mediumtext DEFAULT NULL, > `status` longtext DEFAULT NULL, > `debug` tinyint(1) NOT NULL DEFAULT 0, >- PRIMARY KEY (`id`), >+ PRIMARY KEY (`file_transport_id`), > KEY `host_idx` (`host`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > /*!40101 SET character_set_client = @saved_cs_client */; >diff --git a/t/db_dependent/Koha/File/Transports.t b/t/db_dependent/Koha/File/Transports.t >index 21fb5f9cc08..a2171bb7a81 100755 >--- a/t/db_dependent/Koha/File/Transports.t >+++ b/t/db_dependent/Koha/File/Transports.t >@@ -94,7 +94,8 @@ subtest 'search() tests' => sub { > ); > > # Search for both transports >- my $transports = Koha::File::Transports->search( { id => { -in => [ $sftp_transport->id, $ftp_transport->id ] } } ); >+ my $transports = Koha::File::Transports->search( >+ { file_transport_id => { -in => [ $sftp_transport->id, $ftp_transport->id ] } } ); > > is( > ref($transports), 'Koha::File::Transports', >-- >2.51.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 39190
:
178555
|
178556
|
178557
|
178558
|
178559
|
178560
|
178561
|
178562
|
178563
|
178564
|
178565
|
178566
|
178567
|
178568
|
178569
|
178570
|
178571
|
179252
|
179253
|
179254
|
179255
|
179256
|
179257
|
179258
|
179259
|
179260
|
179261
|
179262
|
179263
|
179264
|
179265
|
179266
|
179267
|
179268
|
179396
|
179397
|
179398
|
179399
|
179400
|
179401
|
179402
|
179403
|
179404
|
179405
|
179406
|
179407
|
179408
|
179409
|
179410
|
179411
|
179412
|
179413
|
179589
|
179590
|
179591
|
179592
|
179593
|
179594
|
179595
|
179596
|
179597
|
179598
|
179599
|
179600
|
179601
|
179602
|
179603
|
179604
|
179605
|
179606
|
179646
|
179647
|
179648
|
179649
|
179650
|
179651
|
179652
|
179653
|
179654
|
179655
|
179656
|
179657
|
179658
|
179659
|
179660
|
179661
|
179662
|
179663
|
179992
|
179993
|
179994
|
179995
|
179996
|
179997
|
179998
|
179999
|
180000
|
180001
|
180002
|
180003
|
180004
|
180005
|
180006
|
180010
|
180011
|
180012
|
180013
|
180014
|
180015
|
180016
|
180017
|
180018
|
180019
|
180020
|
180021
|
180022
|
180023
|
180024
|
180025
|
185014
|
185015
|
185016
|
185017
|
185018
|
185019
|
185020
|
185021
|
185022
|
185023
|
185024
|
185025
|
185026
|
185027
|
185028
|
185029
|
185972
|
185973
|
185974
|
185975
|
185976
|
185977
|
185978
|
185979
|
185980
|
185981
|
185982
|
185983
|
185984
|
185985
|
185986
|
185987
|
185988
|
185989
|
185990
|
185994
|
185995
|
185996
|
185997
|
185998
|
186408
|
186409
|
186410
|
186411
|
186412
|
186413
|
186414
|
186415
|
186416
|
186417
|
186418
|
186419
|
186420
|
186421
|
186422
|
186423
|
186424
|
186425
|
186426
|
186427
|
186428
|
186429
|
186430
| 186431