From 961df91b03885b225709e75d43c7d6cff25fdc5c Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Tue, 30 Jan 2024 14:08:09 +0000 Subject: [PATCH] Bug 28869: Database revision Test plan: Run updatedatabase.pl Signed-off-by: Marcel de Rooy Signed-off-by: Victor Grousset/tuxayo Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- installer/data/mysql/atomicupdate/bug_28869.pl | 17 +++++++++++++++++ installer/data/mysql/kohastructure.sql | 1 + 2 files changed, 18 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_28869.pl diff --git a/installer/data/mysql/atomicupdate/bug_28869.pl b/installer/data/mysql/atomicupdate/bug_28869.pl new file mode 100755 index 0000000000..bf8b9136b3 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_28869.pl @@ -0,0 +1,17 @@ +use Modern::Perl; + +return { + bug_number => 28869, + description => "Add authorised_value_categories.is_integer_only", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + if ( !column_exists( 'authorised_value_categories', 'is_integer_only' ) ) { + $dbh->do( + q{ +ALTER TABLE authorised_value_categories ADD COLUMN is_integer_only tinyint(1) DEFAULT 0 NOT NULL + } + ); + } + }, +}; diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 51506b456a..266eefd3b2 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1009,6 +1009,7 @@ DROP TABLE IF EXISTS `authorised_value_categories`; CREATE TABLE `authorised_value_categories` ( `category_name` varchar(32) NOT NULL DEFAULT '', `is_system` tinyint(1) DEFAULT 0, + `is_integer_only` tinyint(1) NOT NULL DEFAULT 0, PRIMARY KEY (`category_name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- 2.39.5