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 226-231 CREATE TABLE `borrower_attribute_types` ( -- definitions for custom patron field Link Here
226
  `display_checkout` tinyint(1) NOT NULL default 0,-- defines if this field displays in checkout screens
226
  `display_checkout` tinyint(1) NOT NULL default 0,-- defines if this field displays in checkout screens
227
  `category_code` VARCHAR(10) NULL DEFAULT NULL,-- defines a category for an attribute_type
227
  `category_code` VARCHAR(10) NULL DEFAULT NULL,-- defines a category for an attribute_type
228
  `class` VARCHAR(255) NOT NULL DEFAULT '',-- defines a class for an attribute_type
228
  `class` VARCHAR(255) NOT NULL DEFAULT '',-- defines a class for an attribute_type
229
  `mandatory` tinyint(1) NOT NULL DEFAULT 0, -- defines if the attribute is mandatory or not
229
  PRIMARY KEY  (`code`),
230
  PRIMARY KEY  (`code`),
230
  KEY `auth_val_cat_idx` (`authorised_value_category`)
231
  KEY `auth_val_cat_idx` (`authorised_value_category`)
231
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
232
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
232
- 

Return to bug 22844