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 1495-1500 CREATE TABLE `search_field` ( Link Here
1495
  `name` varchar(255) NOT NULL COMMENT 'the name of the field as it will be stored in the search engine',
1495
  `name` varchar(255) NOT NULL COMMENT 'the name of the field as it will be stored in the search engine',
1496
  `label` varchar(255) NOT NULL COMMENT 'the human readable name of the field, for display',
1496
  `label` varchar(255) NOT NULL COMMENT 'the human readable name of the field, for display',
1497
  `type` ENUM('', 'string', 'date', 'number', 'boolean', 'sum') NOT NULL COMMENT 'what type of data this holds, relevant when storing it in the search engine',
1497
  `type` ENUM('', 'string', 'date', 'number', 'boolean', 'sum') NOT NULL COMMENT 'what type of data this holds, relevant when storing it in the search engine',
1498
  `mandatory` tinyint(1) NULL DEFAULT NULL COMMENT 'if marked this field is not editable or removable',
1498
  PRIMARY KEY (`id`),
1499
  PRIMARY KEY (`id`),
1499
  UNIQUE KEY (`name`)
1500
  UNIQUE KEY (`name`)
1500
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1501
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1501
- 

Return to bug 19482