From 184602ce3823b169873daaa675fdebab4f9ae286 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Tue, 24 Oct 2023 10:42:13 +0000 Subject: [PATCH] Bug 34587: Add proprietary_id and platform to erm_usage_titles Signed-off-by: Jessica Zairo Signed-off-by: Michaela Sieber Signed-off-by: Nick Clemens Signed-off-by: Tomas Cohen Arazi --- Koha/ERM/EUsage/CounterFile.pm | 2 ++ Koha/Schema/Result/ErmUsageTitle.pm | 24 +++++++++++++++++-- .../swagger/definitions/erm_usage_title.yaml | 10 ++++++++ .../erm_usage_statistics_tables.pl | 2 ++ installer/data/mysql/kohastructure.sql | 2 ++ 5 files changed, 38 insertions(+), 2 deletions(-) diff --git a/Koha/ERM/EUsage/CounterFile.pm b/Koha/ERM/EUsage/CounterFile.pm index e7c904a756..a5171de94c 100644 --- a/Koha/ERM/EUsage/CounterFile.pm +++ b/Koha/ERM/EUsage/CounterFile.pm @@ -592,6 +592,8 @@ sub _add_usage_object_entry { title => $row->{Title}, usage_data_provider_id => $usage_data_provider->erm_usage_data_provider_id, title_doi => $row->{DOI}, + proprietary_id => $row->{Proprietary_ID}, + platform => $row->{Platform}, print_issn => $row->{Print_ISSN}, online_issn => $row->{Online_ISSN}, title_uri => $row->{URI}, diff --git a/Koha/Schema/Result/ErmUsageTitle.pm b/Koha/Schema/Result/ErmUsageTitle.pm index 6923096aff..a32d7c4056 100644 --- a/Koha/Schema/Result/ErmUsageTitle.pm +++ b/Koha/Schema/Result/ErmUsageTitle.pm @@ -54,6 +54,22 @@ platform the title is harvested by DOI number for the title +=head2 proprietary_id + + data_type: 'varchar' + is_nullable: 1 + size: 255 + +Proprietary_ID for the title + +=head2 platform + + data_type: 'varchar' + is_nullable: 1 + size: 255 + +platform for the title + =head2 print_issn data_type: 'varchar' @@ -121,6 +137,10 @@ __PACKAGE__->add_columns( { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, "title_doi", { data_type => "varchar", is_nullable => 1, size => 255 }, + "proprietary_id", + { data_type => "varchar", is_nullable => 1, size => 255 }, + "platform", + { data_type => "varchar", is_nullable => 1, size => 255 }, "print_issn", { data_type => "varchar", is_nullable => 1, size => 255 }, "online_issn", @@ -197,8 +217,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-10-24 09:31:02 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VfDbgXBq+c2rSXC1A6js5Q +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-10-24 10:15:27 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:V8yMHBVRFQrSm5Vj+V7Y+Q sub koha_object_class { diff --git a/api/v1/swagger/definitions/erm_usage_title.yaml b/api/v1/swagger/definitions/erm_usage_title.yaml index 0cea227ab5..46b5249c9d 100644 --- a/api/v1/swagger/definitions/erm_usage_title.yaml +++ b/api/v1/swagger/definitions/erm_usage_title.yaml @@ -18,6 +18,16 @@ properties: type: - string - "null" + proprietary_id: + description: proprietary_id of the title + type: + - string + - "null" + platform: + description: platform of the title + type: + - string + - "null" print_issn: description: print_issn number of the title type: diff --git a/installer/data/mysql/atomicupdate/erm_usage_statistics_tables.pl b/installer/data/mysql/atomicupdate/erm_usage_statistics_tables.pl index f7b22835d4..a455e6665f 100644 --- a/installer/data/mysql/atomicupdate/erm_usage_statistics_tables.pl +++ b/installer/data/mysql/atomicupdate/erm_usage_statistics_tables.pl @@ -89,6 +89,8 @@ return { `title` mediumtext DEFAULT NULL COMMENT 'item title', `usage_data_provider_id` int(11) NOT NULL COMMENT 'platform the title is harvested by', `title_doi` varchar(255) DEFAULT NULL COMMENT 'DOI number for the title', + `proprietary_id` varchar(255) DEFAULT NULL COMMENT 'Proprietary_ID for the title', + `platform` varchar(255) DEFAULT NULL COMMENT 'platform for the title', `print_issn` varchar(255) DEFAULT NULL COMMENT 'Print ISSN number for the title', `online_issn` varchar(255) DEFAULT NULL COMMENT 'Online ISSN number for the title', `title_uri` varchar(255) DEFAULT NULL COMMENT 'URI number for the title', diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index f45d9766d4..d085a4615f 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -3208,6 +3208,8 @@ CREATE TABLE `erm_usage_titles` ( `title` mediumtext DEFAULT NULL COMMENT 'item title', `usage_data_provider_id` int(11) NOT NULL COMMENT 'platform the title is harvested by', `title_doi` varchar(255) DEFAULT NULL COMMENT 'DOI number for the title', + `proprietary_id` varchar(255) DEFAULT NULL COMMENT 'Proprietary_ID for the title', + `platform` varchar(255) DEFAULT NULL COMMENT 'platform for the title', `print_issn` varchar(255) DEFAULT NULL COMMENT 'Print ISSN number for the title', `online_issn` varchar(255) DEFAULT NULL COMMENT 'Online ISSN number for the title', `title_uri` varchar(255) DEFAULT NULL COMMENT 'URI number for the title', -- 2.39.5