Bugzilla – Attachment 181938 Details for
Bug 39837
Vendor interface object under specified
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39837: Rename (aqbookseller_interfaces) column interface_id to vendor_interface_id
Bug-39837-Rename-aqbooksellerinterfaces-column-int.patch (text/plain), 3.07 KB, created by
Tomás Cohen Arazi (tcohen)
on 2025-05-05 18:18:39 UTC
(
hide
)
Description:
Bug 39837: Rename (aqbookseller_interfaces) column interface_id to vendor_interface_id
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2025-05-05 18:18:39 UTC
Size:
3.07 KB
patch
obsolete
>From ba79dc78ad6d47da57f0fcb8c1b61373f6035f69 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 5 May 2025 15:15:31 -0300 >Subject: [PATCH] Bug 39837: Rename (aqbookseller_interfaces) column > interface_id to vendor_interface_id > >--- > .../data/mysql/atomicupdate/bug_39837.pl | 25 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 4 +-- > 2 files changed, 27 insertions(+), 2 deletions(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_39837.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_39837.pl b/installer/data/mysql/atomicupdate/bug_39837.pl >new file mode 100755 >index 00000000000..a698167e551 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_39837.pl >@@ -0,0 +1,25 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_success say_info); >+ >+return { >+ bug_number => "39837", >+ description => "Rename interface_id -> vendor_interface_id", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ if ( TableExists('aqbookseller_interfaces') ) { >+ if ( column_exists( 'aqbookseller_interfaces', 'interface_id' ) ) { >+ $dbh->do( >+ q{ >+ ALTER TABLE aqbookseller_interfaces RENAME COLUMN interface_id TO vendor_interface_id; >+ } >+ ); >+ say_success( >+ $out, >+ q{Column 'aqbookseller_interfaces.interface_id' renamed to 'aqbookseller_interfaces.vendor_interface_id'} >+ ); >+ } >+ } >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index ffd35addab8..f482c2ce48d 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -435,7 +435,7 @@ DROP TABLE IF EXISTS `aqbookseller_interfaces`; > /*!40101 SET @saved_cs_client = @@character_set_client */; > /*!40101 SET character_set_client = utf8mb4 */; > CREATE TABLE `aqbookseller_interfaces` ( >- `interface_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key and unique identifier assigned by Koha', >+ `vendor_interface_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key and unique identifier assigned by Koha', > `vendor_id` int(11) NOT NULL COMMENT 'link to the vendor', > `type` varchar(80) DEFAULT NULL COMMENT 'type of the interface, authorised value VENDOR_INTERFACE_TYPE', > `name` varchar(255) NOT NULL COMMENT 'name of the interface', >@@ -444,7 +444,7 @@ CREATE TABLE `aqbookseller_interfaces` ( > `password` mediumtext DEFAULT NULL COMMENT 'hashed password', > `account_email` mediumtext DEFAULT NULL COMMENT 'account email', > `notes` longtext DEFAULT NULL COMMENT 'notes', >- PRIMARY KEY (`interface_id`), >+ PRIMARY KEY (`vendor_interface_id`), > KEY `aqbookseller_interfaces_ibfk_1` (`vendor_id`), > CONSTRAINT `aqbookseller_interfaces_ibfk_1` FOREIGN KEY (`vendor_id`) REFERENCES `aqbooksellers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; >-- >2.49.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 39837
:
181938
|
181939
|
181940
|
182326
|
182327
|
182328