Bugzilla – Attachment 103844 Details for
Bug 22844
Simplify the process of selecting database columns for system preferences
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22844: Add the new DB column borrower_attribute_types.mandatory
Bug-22844-Add-the-new-DB-column-borrowerattributet.patch (text/plain), 2.13 KB, created by
Jonathan Druart
on 2020-04-28 11:21:30 UTC
(
hide
)
Description:
Bug 22844: Add the new DB column borrower_attribute_types.mandatory
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-04-28 11:21:30 UTC
Size:
2.13 KB
patch
obsolete
>From f2ca2b5f71e6b1fa6de3234c455da07994578ff0 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 17 May 2019 09:06:04 -0500 >Subject: [PATCH] Bug 22844: Add the new DB column > borrower_attribute_types.mandatory > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > installer/data/mysql/atomicupdate/bug_22844.perl | 14 ++++++++++++++ > installer/data/mysql/kohastructure.sql | 1 + > 2 files changed, 15 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_22844.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_22844.perl b/installer/data/mysql/atomicupdate/bug_22844.perl >new file mode 100644 >index 0000000000..def80b96d5 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_22844.perl >@@ -0,0 +1,14 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ >+ if( !column_exists( 'borrower_attribute_types', 'mandatory' ) ) { >+ $dbh->do(q| >+ ALTER TABLE borrower_attribute_types >+ ADD COLUMN mandatory TINYINT(1) NOT NULL DEFAULT 0 >+ AFTER class >+ |); >+ } >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug XXXXX - Add borrower_attribute_types.mandatory)\n"; >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 1cb3165eee..48a88b40a8 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -227,6 +227,7 @@ CREATE TABLE `borrower_attribute_types` ( -- definitions for custom patron field > `display_checkout` tinyint(1) NOT NULL default 0,-- defines if this field displays in checkout screens > `category_code` VARCHAR(10) NULL DEFAULT NULL,-- defines a category for an attribute_type > `class` VARCHAR(255) NOT NULL DEFAULT '',-- defines a class for an attribute_type >+ `mandatory` tinyint(1) NOT NULL DEFAULT 0, -- defines if the attribute is mandatory or not > PRIMARY KEY (`code`), > KEY `auth_val_cat_idx` (`authorised_value_category`) > ) 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 22844
:
89322
|
89323
|
89389
|
89403
|
89530
|
89531
|
89749
|
89903
|
89904
|
89905
|
90407
|
96007
|
98145
|
98146
|
98147
|
98148
|
98149
|
98150
|
98151
|
98297
|
98298
|
100440
|
100441
|
100442
|
100443
|
100444
|
100445
|
100446
|
100447
|
101198
|
101199
|
101200
|
101201
|
101202
|
101203
|
101204
|
101205
|
101302
|
101480
|
101481
|
101482
|
101483
|
101484
|
101485
|
101486
|
101487
|
101488
|
101617
|
101618
|
101619
|
101620
|
101621
|
101622
|
101623
|
101624
|
103842
|
103843
|
103844
|
103845
|
103846
|
103847
|
103848
|
103849
|
103850
|
103904
|
103960
|
103961
|
103962
|
103963
|
103964
|
103965
|
103966
|
103967
|
103968
|
103969
|
106545
|
106546
|
106547
|
106548
|
106549
|
106550
|
106551
|
106552
|
106553
|
106554
|
107126