Bug 39190: Rename id => file_transport_id and remove mapping

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Tomas Cohen Arazi 2025-08-30 12:29:55 -03:00 committed by Lucas Gass
parent 67a7901663
commit a5f72d7362
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
4 changed files with 12 additions and 11 deletions

View File

@ -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 },

View File

@ -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;
}

View File

@ -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 */;

View File

@ -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',