Bugzilla – Attachment 103833 Details for
Bug 17355
Authorised value categories cannot be deleted
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17355: DB changes
Bug-17355-DB-changes.patch (text/plain), 1.99 KB, created by
Jonathan Druart
on 2020-04-28 10:07:57 UTC
(
hide
)
Description:
Bug 17355: DB changes
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-04-28 10:07:57 UTC
Size:
1.99 KB
patch
obsolete
>From c4d0a91c262612f7f07a8de75683fb60149064e8 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 28 Apr 2020 11:01:19 +0200 >Subject: [PATCH] Bug 17355: DB changes > >This patch adds a new authorised_value_category.is_system boolean/tinyint(1) >DB field. > >Name 'is_system' is coming from existing tables account_credit_types and >account_debit_types and should not be discussed here (if you disagree >fill a new bug report and deal with naming issue separately) >--- > installer/data/mysql/atomicupdate/bug_17355.perl | 13 +++++++++++++ > installer/data/mysql/kohastructure.sql | 1 + > 2 files changed, 14 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_17355.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_17355.perl b/installer/data/mysql/atomicupdate/bug_17355.perl >new file mode 100644 >index 0000000000..d0c5243cdb >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_17355.perl >@@ -0,0 +1,13 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ >+ unless ( column_exists( 'authorised_value_categories', 'is_system' ) ) { >+ $dbh->do(q| >+ ALTER TABLE authorised_value_categories >+ ADD COLUMN is_system TINYINT(1) DEFAULT 0 AFTER category_name >+ |); >+ } >+ >+ # Always end with this (adjust the bug info) >+ NewVersion( $DBversion, 17355, "Description"); >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 1cb3165eee..341c17bc26 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -100,6 +100,7 @@ CREATE TABLE `auth_tag_structure` ( > DROP TABLE IF EXISTS `authorised_value_categories`; > CREATE TABLE `authorised_value_categories` ( > `category_name` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', >+ `is_system` tinyint(1) default 0, > PRIMARY KEY (`category_name`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > >-- >2.20.1
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 17355
:
64102
|
65782
|
65869
|
65870
|
66022
|
66023
|
66024
|
103833
|
103834
|
103835
|
103836
|
103837
|
103838
|
104099
|
104100
|
104101
|
104102
|
104103
|
104104
|
104117
|
104118
|
104119
|
104120
|
104121
|
104122
|
104123
|
104352
|
104539