Bugzilla – Attachment 182320 Details for
Bug 39838
Vendor alias object under specified
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39838: Rename (aqbookseller_aliases) column alias_id to vendor_alias_id
Bug-39838-Rename-aqbookselleraliases-column-aliasi.patch (text/plain), 2.70 KB, created by
Martin Renvoize (ashimema)
on 2025-05-13 06:30:10 UTC
(
hide
)
Description:
Bug 39838: Rename (aqbookseller_aliases) column alias_id to vendor_alias_id
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-05-13 06:30:10 UTC
Size:
2.70 KB
patch
obsolete
>From 3d59e5b4b7555af784a70acc9b38cf4e988315aa Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 5 May 2025 14:54:56 -0300 >Subject: [PATCH] Bug 39838: Rename (aqbookseller_aliases) column alias_id to > vendor_alias_id > >Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> >--- > .../data/mysql/atomicupdate/bug_39838.pl | 25 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 4 +-- > 2 files changed, 27 insertions(+), 2 deletions(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_39838.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_39838.pl b/installer/data/mysql/atomicupdate/bug_39838.pl >new file mode 100755 >index 00000000000..1e1ae6cb036 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_39838.pl >@@ -0,0 +1,25 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_success say_info); >+ >+return { >+ bug_number => "39838", >+ description => "Rename alias_id -> vendor_alias_id", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ if ( TableExists('aqbookseller_aliases') ) { >+ if ( column_exists( 'aqbookseller_aliases', 'alias_id' ) ) { >+ $dbh->do( >+ q{ >+ ALTER TABLE aqbookseller_aliases RENAME COLUMN alias_id TO vendor_alias_id; >+ } >+ ); >+ say_success( >+ $out, >+ q{Column 'aqbookseller_aliases.alias_id' renamed to 'aqbookseller_aliases.vendor_alias_id'} >+ ); >+ } >+ } >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 3602c65c18e..70274e8d48c 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -418,10 +418,10 @@ DROP TABLE IF EXISTS `aqbookseller_aliases`; > /*!40101 SET @saved_cs_client = @@character_set_client */; > /*!40101 SET character_set_client = utf8mb4 */; > CREATE TABLE `aqbookseller_aliases` ( >- `alias_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key and unique identifier assigned by Koha', >+ `vendor_alias_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', > `alias` varchar(255) NOT NULL COMMENT 'the alias', >- PRIMARY KEY (`alias_id`), >+ PRIMARY KEY (`vendor_alias_id`), > KEY `aqbookseller_aliases_ibfk_1` (`vendor_id`), > CONSTRAINT `aqbookseller_aliases_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 39838
:
181932
|
181933
|
181934
|
181935
|
181936
|
182320
|
182321
|
182322
|
182323
|
182324
|
182325