Bugzilla – Attachment 101312 Details for
Bug 19482
Elasticsearch - prevent removal / editing of required indexes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19482 - DB changes
Bug-19482---DB-changes.patch (text/plain), 2.04 KB, created by
Bouzid Fergani
on 2020-03-20 18:24:15 UTC
(
hide
)
Description:
Bug 19482 - DB changes
Filename:
MIME Type:
Creator:
Bouzid Fergani
Created:
2020-03-20 18:24:15 UTC
Size:
2.04 KB
patch
obsolete
>From 97a9a5bcdce671798306b8e36e661a8a4449e001 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 18 Oct 2017 13:05:40 +0000 >Subject: [PATCH] Bug 19482 - DB changes > >Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> >Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com> > >https://bugs.koha-community.org/show_bug.cgi?id=21357 >--- > .../atomicupdate/bug_19482_add_mandatory_field_to_mapping.perl | 10 ++++++++++ > installer/data/mysql/kohastructure.sql | 1 + > 2 files changed, 11 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_19482_add_mandatory_field_to_mapping.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_19482_add_mandatory_field_to_mapping.perl b/installer/data/mysql/atomicupdate/bug_19482_add_mandatory_field_to_mapping.perl >new file mode 100644 >index 0000000..2bda6dd >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_19482_add_mandatory_field_to_mapping.perl >@@ -0,0 +1,10 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ >+ if( !column_exists( 'search_field', 'mandatory' ) ) { >+ $dbh->do( "ALTER TABLE search_field ADD COLUMN mandatory tinyint(1) NULL DEFAULT NULL" ); >+ } >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 19482 - Add mandatory column to search_field for ES mapping)\n"; >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 6495f25..77860ca 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -1346,6 +1346,7 @@ CREATE TABLE `search_field` ( > `facet_order` TINYINT(4) DEFAULT NULL COMMENT 'the order place of the field in facet list if faceted', > `staff_client` tinyint(1) NOT NULL DEFAULT 1, > `opac` tinyint(1) NOT NULL DEFAULT 1, >+ `mandatory` tinyint(1) NULL DEFAULT NULL COMMENT 'if marked this field is not editable or removable', > PRIMARY KEY (`id`), > UNIQUE KEY (`name` (191)) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; >-- >2.7.4
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 19482
:
68246
|
68247
|
68248
|
69250
|
72846
|
72847
|
72848
|
72878
|
72879
|
72880
|
77007
|
77008
|
77009
|
77010
|
80817
|
80818
|
80819
|
80820
|
93366
|
93367
|
93368
|
93371
|
93372
|
93373
|
97226
|
97227
|
97228
|
101312
|
101313
|
101314
|
108467
|
108468
|
108469
|
108470
|
108471
|
111923
|
111924
|
111925
|
111926
|
111927
|
111929
|
112456
|
112459
|
112460
|
112461
|
112462
|
112463
|
112464
|
112465