From 040f6ef1935caf94d3fc1b372a6faf022d683018 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Mon, 18 Sep 2023 16:00:28 +0000 Subject: [PATCH] Bug 34587: Update field lengths to 255 characters (cherry picked from commit 9f384df2ad5f4c037b052e8914d7e4b3e5f26670) (cherry picked from commit 02c9a57af9f27cf528a2eb924876037890cf5504) Signed-off-by: Jessica Zairo Signed-off-by: Michaela Sieber Signed-off-by: Nick Clemens Signed-off-by: Tomas Cohen Arazi --- Koha/Schema/Result/ErmUsageDatabase.pm | 12 ++++++------ Koha/Schema/Result/ErmUsageItem.pm | 16 ++++++++-------- Koha/Schema/Result/ErmUsageTitle.pm | 8 ++++---- .../atomicupdate/erm_usage_statistics_tables.pl | 12 ++++++------ installer/data/mysql/kohastructure.sql | 12 ++++++------ 5 files changed, 30 insertions(+), 30 deletions(-) diff --git a/Koha/Schema/Result/ErmUsageDatabase.pm b/Koha/Schema/Result/ErmUsageDatabase.pm index 5902ab8e63..02db8a0069 100644 --- a/Koha/Schema/Result/ErmUsageDatabase.pm +++ b/Koha/Schema/Result/ErmUsageDatabase.pm @@ -43,7 +43,7 @@ item title data_type: 'varchar' is_nullable: 1 - size: 24 + size: 255 database platform @@ -51,7 +51,7 @@ database platform data_type: 'varchar' is_nullable: 1 - size: 24 + size: 255 Publisher for the database @@ -79,9 +79,9 @@ __PACKAGE__->add_columns( "database", { data_type => "varchar", is_nullable => 1, size => 255 }, "platform", - { data_type => "varchar", is_nullable => 1, size => 24 }, + { data_type => "varchar", is_nullable => 1, size => 255 }, "publisher", - { data_type => "varchar", is_nullable => 1, size => 24 }, + { data_type => "varchar", is_nullable => 1, size => 255 }, "publisher_id", { data_type => "varchar", is_nullable => 1, size => 24 }, "usage_data_provider_id", @@ -148,8 +148,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-07-26 11:45:56 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:N/qxjz0Jz0NOI6lFVkUXhg +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-09-18 15:59:44 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:aKPQT+piqnU4mqUHDXTXQw # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/ErmUsageItem.pm b/Koha/Schema/Result/ErmUsageItem.pm index c4aa77c1fd..f8d542d107 100644 --- a/Koha/Schema/Result/ErmUsageItem.pm +++ b/Koha/Schema/Result/ErmUsageItem.pm @@ -35,7 +35,7 @@ primary key data_type: 'varchar' is_nullable: 1 - size: 255 + size: 500 item title @@ -43,7 +43,7 @@ item title data_type: 'varchar' is_nullable: 1 - size: 80 + size: 255 item platform @@ -51,7 +51,7 @@ item platform data_type: 'varchar' is_nullable: 1 - size: 80 + size: 255 Publisher for the item @@ -69,11 +69,11 @@ __PACKAGE__->add_columns( "item_id", { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, "item", - { data_type => "varchar", is_nullable => 1, size => 255 }, + { data_type => "varchar", is_nullable => 1, size => 500 }, "platform", - { data_type => "varchar", is_nullable => 1, size => 80 }, + { data_type => "varchar", is_nullable => 1, size => 255 }, "publisher", - { data_type => "varchar", is_nullable => 1, size => 80 }, + { data_type => "varchar", is_nullable => 1, size => 255 }, "usage_data_provider_id", { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, ); @@ -138,8 +138,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-08-02 12:15:06 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ovoxM438smZou+pFm85igw +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-09-19 14:47:38 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:quaq96wxTCK9Glzt0zVDEw # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/ErmUsageTitle.pm b/Koha/Schema/Result/ErmUsageTitle.pm index bfa412e1ad..2a77a041b4 100644 --- a/Koha/Schema/Result/ErmUsageTitle.pm +++ b/Koha/Schema/Result/ErmUsageTitle.pm @@ -83,7 +83,7 @@ URI number for the title data_type: 'varchar' is_nullable: 1 - size: 24 + size: 255 Publisher for the title @@ -129,7 +129,7 @@ __PACKAGE__->add_columns( "title_uri", { data_type => "varchar", is_nullable => 1, size => 24 }, "publisher", - { data_type => "varchar", is_nullable => 1, size => 24 }, + { data_type => "varchar", is_nullable => 1, size => 255 }, "publisher_id", { data_type => "varchar", is_nullable => 1, size => 24 }, "yop", @@ -198,8 +198,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-06-01 16:24:08 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Pd0jk01S8AGLjLWoLGWwZA +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-09-18 15:59:44 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:mgP48bpl+C3oD/7IHLgQTw sub koha_object_class { diff --git a/installer/data/mysql/atomicupdate/erm_usage_statistics_tables.pl b/installer/data/mysql/atomicupdate/erm_usage_statistics_tables.pl index 0f955eb6d0..f513c48429 100644 --- a/installer/data/mysql/atomicupdate/erm_usage_statistics_tables.pl +++ b/installer/data/mysql/atomicupdate/erm_usage_statistics_tables.pl @@ -90,7 +90,7 @@ return { `print_issn` varchar(24) DEFAULT NULL COMMENT 'Print ISSN number for the title', `online_issn` varchar(24) DEFAULT NULL COMMENT 'Online ISSN number for the title', `title_uri` varchar(24) DEFAULT NULL COMMENT 'URI number for the title', - `publisher` varchar(24) DEFAULT NULL COMMENT 'Publisher for the title', + `publisher` varchar(255) DEFAULT NULL COMMENT 'Publisher for the title', `publisher_id` varchar(24) DEFAULT NULL COMMENT 'Publisher ID for the title', `yop` varchar(24) DEFAULT NULL COMMENT 'year of publication of the title', `isbn` varchar(24) DEFAULT NULL COMMENT 'ISBN of the title', @@ -129,8 +129,8 @@ return { CREATE TABLE `erm_usage_databases` ( `database_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key', `database` varchar(255) DEFAULT NULL COMMENT 'item title', - `platform` varchar(24) DEFAULT NULL COMMENT 'database platform', - `publisher` varchar(24) DEFAULT NULL COMMENT 'Publisher for the database', + `platform` varchar(255) DEFAULT NULL COMMENT 'database platform', + `publisher` varchar(255) DEFAULT NULL COMMENT 'Publisher for the database', `publisher_id` varchar(24) DEFAULT NULL COMMENT 'Publisher ID for the database', `usage_data_provider_id` int(11) NOT NULL COMMENT 'data provider the database is harvested by', PRIMARY KEY (`database_id`), @@ -149,9 +149,9 @@ return { q{ CREATE TABLE `erm_usage_items` ( `item_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key', - `item` varchar(255) DEFAULT NULL COMMENT 'item title', - `platform` varchar(80) DEFAULT NULL COMMENT 'item platform', - `publisher` varchar(80) DEFAULT NULL COMMENT 'Publisher for the item', + `item` varchar(500) DEFAULT NULL COMMENT 'item title', + `platform` varchar(255) DEFAULT NULL COMMENT 'item platform', + `publisher` varchar(255) DEFAULT NULL COMMENT 'Publisher for the item', `usage_data_provider_id` int(11) NOT NULL COMMENT 'data provider the database is harvested by', PRIMARY KEY (`item_id`), CONSTRAINT `erm_usage_items_ibfk_1` FOREIGN KEY (`usage_data_provider_id`) REFERENCES `erm_usage_data_providers` (`erm_usage_data_provider_id`) ON DELETE CASCADE ON UPDATE CASCADE diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 08f2f623ae..96bfdeb9fd 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -3209,7 +3209,7 @@ CREATE TABLE `erm_usage_titles` ( `print_issn` varchar(24) DEFAULT NULL COMMENT 'Print ISSN number for the title', `online_issn` varchar(24) DEFAULT NULL COMMENT 'Online ISSN number for the title', `title_uri` varchar(24) DEFAULT NULL COMMENT 'URI number for the title', - `publisher` varchar(24) DEFAULT NULL COMMENT 'Publisher for the title', + `publisher` varchar(255) DEFAULT NULL COMMENT 'Publisher for the title', `publisher_id` varchar(24) DEFAULT NULL COMMENT 'Publisher ID for the title', `yop` varchar(24) DEFAULT NULL COMMENT 'year of publication of the title', `isbn` varchar(24) DEFAULT NULL COMMENT 'ISBN of the title', @@ -3244,8 +3244,8 @@ DROP TABLE IF EXISTS `erm_usage_databases`; CREATE TABLE `erm_usage_databases` ( `database_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key', `database` varchar(255) DEFAULT NULL COMMENT 'item title', - `platform` varchar(24) DEFAULT NULL COMMENT 'database platform', - `publisher` varchar(24) DEFAULT NULL COMMENT 'Publisher for the database', + `platform` varchar(255) DEFAULT NULL COMMENT 'database platform', + `publisher` varchar(255) DEFAULT NULL COMMENT 'Publisher for the database', `publisher_id` varchar(24) DEFAULT NULL COMMENT 'Publisher ID for the database', `usage_data_provider_id` int(11) NOT NULL COMMENT 'data provider the database is harvested by', PRIMARY KEY (`database_id`), @@ -3262,9 +3262,9 @@ DROP TABLE IF EXISTS `erm_usage_items`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `erm_usage_items` ( `item_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key', - `item` varchar(255) DEFAULT NULL COMMENT 'item title', - `platform` varchar(80) DEFAULT NULL COMMENT 'item platform', - `publisher` varchar(80) DEFAULT NULL COMMENT 'Publisher for the item', + `item` varchar(500) DEFAULT NULL COMMENT 'item title', + `platform` varchar(255) DEFAULT NULL COMMENT 'item platform', + `publisher` varchar(255) DEFAULT NULL COMMENT 'Publisher for the item', `usage_data_provider_id` int(11) NOT NULL COMMENT 'data provider the database is harvested by', PRIMARY KEY (`item_id`), CONSTRAINT `erm_usage_items_ibfk_1` FOREIGN KEY (`usage_data_provider_id`) REFERENCES `erm_usage_data_providers` (`erm_usage_data_provider_id`) ON DELETE CASCADE ON UPDATE CASCADE -- 2.39.5