Browse Source

Bug 19482: DB changes

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
20.11.x
Nick Clemens 7 years ago
committed by Jonathan Druart
parent
commit
14f99da17c
  1. 10
      installer/data/mysql/atomicupdate/bug_19482_add_mandatory_field_to_mapping.perl
  2. 1
      installer/data/mysql/kohastructure.sql

10
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";
}

1
installer/data/mysql/kohastructure.sql

@ -1376,6 +1376,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;

Loading…
Cancel
Save