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

Return to bug 22844