From 25621d7c26319a881ffe16f90ab89c487627a84a Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 16 Dec 2021 12:41:06 +0100 Subject: [PATCH] Bug 29648: Allow tables_settings.default_display_length to be NULL We actually want this value to be NULL. If set to NULL and default_display_length is not in the yml, then the option will not be displayed. Signed-off-by: Owen Leonard Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer Signed-off-by: Fridolin Somers --- installer/data/mysql/atomicupdate/bug_29648_2.pl | 14 ++++++++++++++ installer/data/mysql/kohastructure.sql | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100755 installer/data/mysql/atomicupdate/bug_29648_2.pl diff --git a/installer/data/mysql/atomicupdate/bug_29648_2.pl b/installer/data/mysql/atomicupdate/bug_29648_2.pl new file mode 100755 index 0000000000..555fb676e7 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_29648_2.pl @@ -0,0 +1,14 @@ +use Modern::Perl; + +return { + bug_number => "29648", + description => "Allow tables_settings.default_display_length to be NULL", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + $dbh->do(q{ + ALTER TABLE tables_settings + MODIFY COLUMN default_display_length smallint(6) DEFAULT NULL + }); + }, +} diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 8f5f7b438f..f7ec7186b9 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -5063,7 +5063,7 @@ CREATE TABLE `tables_settings` ( `module` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `page` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `tablename` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, - `default_display_length` smallint(6) NOT NULL DEFAULT 20, + `default_display_length` smallint(6) DEFAULT NULL, `default_sort_order` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, PRIMARY KEY (`module`(191),`page`(191),`tablename`(191)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- 2.39.5