View | Details | Raw Unified | Return to bug 19482
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_19482_add_mandatory_field_to_mapping.perl (+10 lines)
Line 0 Link Here
1
$DBversion = 'XXX';  # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
4
    if( !column_exists( 'search_field', 'mandatory' ) ) {
5
        $dbh->do( "ALTER TABLE search_field ADD COLUMN mandatory tinyint(1) NULL DEFAULT NULL" );
6
    }
7
8
    SetVersion( $DBversion );
9
    print "Upgrade to $DBversion done (Bug 19482 - Add mandatory column to search_field for ES mapping)\n";
10
}
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 1398-1403 CREATE TABLE `search_field` ( Link Here
1398
  `facet_order` TINYINT(4) DEFAULT NULL COMMENT 'the order place of the field in facet list if faceted',
1398
  `facet_order` TINYINT(4) DEFAULT NULL COMMENT 'the order place of the field in facet list if faceted',
1399
  `staff_client` tinyint(1) NOT NULL DEFAULT 1,
1399
  `staff_client` tinyint(1) NOT NULL DEFAULT 1,
1400
  `opac` tinyint(1) NOT NULL DEFAULT 1,
1400
  `opac` tinyint(1) NOT NULL DEFAULT 1,
1401
  `mandatory` tinyint(1) NULL DEFAULT NULL COMMENT 'if marked this field is not editable or removable',
1401
  PRIMARY KEY (`id`),
1402
  PRIMARY KEY (`id`),
1402
  UNIQUE KEY (`name` (191))
1403
  UNIQUE KEY (`name` (191))
1403
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1404
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
1404
- 

Return to bug 19482