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

(-)a/installer/data/mysql/atomicupdate/bug_22844.perl (+14 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
4
    if( !column_exists( 'borrower_attribute_types', 'mandatory' ) ) {
5
        $dbh->do(q|
6
            ALTER TABLE borrower_attribute_types
7
            ADD COLUMN mandatory TINYINT(1) NOT NULL DEFAULT 0
8
            AFTER class
9
        |);
10
    }
11
12
    SetVersion( $DBversion );
13
    print "Upgrade to $DBversion done (Bug XXXXX - Add borrower_attribute_types.mandatory)\n";
14
}
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 228-233 CREATE TABLE `borrower_attribute_types` ( -- definitions for custom patron field Link Here
228
  `display_checkout` tinyint(1) NOT NULL default 0,-- defines if this field displays in checkout screens
228
  `display_checkout` tinyint(1) NOT NULL default 0,-- defines if this field displays in checkout screens
229
  `category_code` VARCHAR(10) NULL DEFAULT NULL,-- defines a category for an attribute_type
229
  `category_code` VARCHAR(10) NULL DEFAULT NULL,-- defines a category for an attribute_type
230
  `class` VARCHAR(255) NOT NULL DEFAULT '',-- defines a class for an attribute_type
230
  `class` VARCHAR(255) NOT NULL DEFAULT '',-- defines a class for an attribute_type
231
  `mandatory` tinyint(1) NOT NULL DEFAULT 0, -- defines if the attribute is mandatory or not
231
  PRIMARY KEY  (`code`),
232
  PRIMARY KEY  (`code`),
232
  KEY `auth_val_cat_idx` (`authorised_value_category`)
233
  KEY `auth_val_cat_idx` (`authorised_value_category`)
233
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
234
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
234
- 

Return to bug 22844