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

(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 286-292 CREATE TABLE `borrower_attribute_types` ( -- definitions for custom patron field Link Here
286
  `staff_searchable` tinyint(1) NOT NULL default 0, -- defines if this field is searchable via the patron search in the staff client (1 for yes, 0 for no)
286
  `staff_searchable` tinyint(1) NOT NULL default 0, -- defines if this field is searchable via the patron search in the staff client (1 for yes, 0 for no)
287
  `authorised_value_category` varchar(10) default NULL, -- foreign key from authorised_values that links this custom field to an authorized value category
287
  `authorised_value_category` varchar(10) default NULL, -- foreign key from authorised_values that links this custom field to an authorized value category
288
  `display_checkout` tinyint(1) NOT NULL default 0,-- defines if this field displays in checkout screens
288
  `display_checkout` tinyint(1) NOT NULL default 0,-- defines if this field displays in checkout screens
289
  `category_code` VARCHAR(1) NOT NULL DEFAULT '',-- defines a category for an attribute_type
289
  `category_code` VARCHAR(1) NULL DEFAULT NULL,-- defines a category for an attribute_type
290
  `class` VARCHAR(255) NOT NULL DEFAULT '',-- defines a class for an attribute_type
290
  `class` VARCHAR(255) NOT NULL DEFAULT '',-- defines a class for an attribute_type
291
  PRIMARY KEY  (`code`),
291
  PRIMARY KEY  (`code`),
292
  KEY `auth_val_cat_idx` (`authorised_value_category`)
292
  KEY `auth_val_cat_idx` (`authorised_value_category`)
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +7 lines)
Lines 5212-5217 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
5212
    SetVersion($DBversion);
5212
    SetVersion($DBversion);
5213
}
5213
}
5214
5214
5215
$DBversion = "3.08.00.XXX";
5216
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
5217
    $dbh->do("ALTER TABLE borrower_attribute_types CHANGE category_code category_code VARCHAR( 1 ) NULL DEFAULT NULL");
5218
    print "Upgrade to $DBversion done. (Bug 8002: Update patron attribute types table to allow NULL category_code)\n";
5219
    SetVersion($DBversion);
5220
}
5221
5215
=head1 FUNCTIONS
5222
=head1 FUNCTIONS
5216
5223
5217
=head2 TableExists($table)
5224
=head2 TableExists($table)
5218
- 

Return to bug 8002