From f9217ff72fd63de7b56f196f6c1adee34d3f016e 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 Content-Type: text/plain; charset=utf-8 Test plan: Run updatedatabase.pl Signed-off-by: Marcel de Rooy Signed-off-by: Victor Grousset/tuxayo --- 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 ea540c0819..b4cbda7e97 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1008,6 +1008,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.30.2