Bugzilla – Attachment 180273 Details for
Bug 37934
Extend length of API key, requestor ID and customer ID for data providers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37934: Extend data types for customer ID, requestor ID, and API key for ERM data providers
Bug-37934-Extend-data-types-for-customer-ID-reques.patch (text/plain), 3.80 KB, created by
Lucas Gass (lukeg)
on 2025-04-02 09:36:00 UTC
(
hide
)
Description:
Bug 37934: Extend data types for customer ID, requestor ID, and API key for ERM data providers
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2025-04-02 09:36:00 UTC
Size:
3.80 KB
patch
obsolete
>From 25d232b3b67794368cc378f16ae1f6d5a0abfb24 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer@bsz-bw.de> >Date: Tue, 1 Apr 2025 09:26:53 +0000 >Subject: [PATCH] Bug 37934: Extend data types for customer ID, requestor ID, > and API key for ERM data providers > >This changes the datatype of customer ID, requestor ID, and API key >from limited varchar to text to accustom for longer values. > >To test: >* Apply the patch >* Run updatedatabase (a sandbox will do this automatically) >* Activate the ERM module in the system preferences (ERMModule) >* Go to E-ressource management > Data providers > New data provider >* Make sure you can enter values longer than 265 in the fields named > above and that they are stored correctly. > >Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com> >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >--- > .../data/mysql/atomicupdate/bug_37934.pl | 26 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 8 +++--- > 2 files changed, 30 insertions(+), 4 deletions(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_37934.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_37934.pl b/installer/data/mysql/atomicupdate/bug_37934.pl >new file mode 100755 >index 00000000000..eb2b1ac523d >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_37934.pl >@@ -0,0 +1,26 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_success say_info); >+ >+return { >+ bug_number => "37934", >+ description => "Extend storable data for customer ID, requestor ID and API Key for ERM data providers", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ $dbh->do( >+ q{ALTER TABLE erm_usage_data_providers MODIFY COLUMN customer_id text DEFAULT NULL COMMENT 'SUSHI customer ID'} >+ ); >+ say_success( $out, "Updated erm_usage_data_providers.customer_id to datatype text" ); >+ >+ $dbh->do( >+ q{ALTER TABLE erm_usage_data_providers MODIFY COLUMN requestor_id text DEFAULT NULL COMMENT 'SUSHI requestor ID'} >+ ); >+ say_success( $out, "Updated erm_usage_data_providers.requestor_id to datatype text" ); >+ >+ $dbh->do( >+ q{ALTER TABLE erm_usage_data_providers MODIFY COLUMN api_key text DEFAULT NULL COMMENT 'SUSHI API key'}); >+ say_success( $out, "Updated erm_usage_data_providers.api_key to datatype text" ); >+ >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 9b7dc7fc6ec..93ad196454c 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -3261,9 +3261,9 @@ CREATE TABLE `erm_usage_data_providers` ( > `service_type` varchar(80) DEFAULT NULL COMMENT 'service_type of the harvester', > `service_url` varchar(80) DEFAULT NULL COMMENT 'service_url of the harvester', > `report_release` varchar(80) DEFAULT NULL COMMENT 'report_release of the harvester', >- `customer_id` varchar(50) DEFAULT NULL COMMENT 'sushi customer id', >- `requestor_id` varchar(50) DEFAULT NULL COMMENT 'sushi requestor id', >- `api_key` varchar(80) DEFAULT NULL COMMENT 'sushi api key', >+ `customer_id` text DEFAULT NULL COMMENT 'SUSHI customer ID', >+ `requestor_id` text DEFAULT NULL COMMENT 'SUSHI requestor ID', >+ `api_key` text DEFAULT NULL COMMENT 'SUSHI API key', > `requestor_name` varchar(80) DEFAULT NULL COMMENT 'requestor name', > `requestor_email` varchar(80) DEFAULT NULL COMMENT 'requestor email', > `report_types` varchar(255) DEFAULT NULL COMMENT 'report types provided by the harvester', >@@ -6796,4 +6796,4 @@ CREATE TABLE `zebraqueue` ( > /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; > /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; > >--- Dump completed on 2024-11-25 12:13:27 >\ No newline at end of file >+-- Dump completed on 2024-11-25 12:13:27 >-- >2.39.5
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 37934
:
180107
|
180112
| 180273