Bugzilla – Attachment 166697 Details for
Bug 28869
Optionally restrict authorised values to tinyint
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28869: Database revision
Bug-28869-Database-revision.patch (text/plain), 2.01 KB, created by
Martin Renvoize (ashimema)
on 2024-05-14 16:39:14 UTC
(
hide
)
Description:
Bug 28869: Database revision
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-05-14 16:39:14 UTC
Size:
2.01 KB
patch
obsolete
>From e1fe387e8c7a27bef24182b2e50a960bae43856b Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >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 <m.de.rooy@rijksmuseum.nl> >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > 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 00000000000..bf8b9136b35 >--- /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 51506b456a7..266eefd3b28 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.45.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28869
:
161745
|
161746
|
161747
|
161748
|
161749
|
162412
|
162413
|
162414
|
162415
|
162416
|
163996
|
163997
|
163998
|
163999
|
164000
|
164001
| 166697 |
166698
|
166699
|
166700
|
166701
|
166702
|
166906