Bug 8002: FIX Change datatype from varchar 1 to 10 for borrower_attribute_types.category_code
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This commit is contained in:
parent
3b608056d9
commit
ef1fc52c71
2 changed files with 8 additions and 1 deletions
|
@ -288,7 +288,7 @@ CREATE TABLE `borrower_attribute_types` ( -- definitions for custom patron field
|
||||||
`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)
|
`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)
|
||||||
`authorised_value_category` varchar(10) default NULL, -- foreign key from authorised_values that links this custom field to an authorized value category
|
`authorised_value_category` varchar(10) default NULL, -- foreign key from authorised_values that links this custom field to an authorized value category
|
||||||
`display_checkout` tinyint(1) NOT NULL default 0,-- defines if this field displays in checkout screens
|
`display_checkout` tinyint(1) NOT NULL default 0,-- defines if this field displays in checkout screens
|
||||||
`category_code` VARCHAR(1) NULL DEFAULT NULL,-- defines a category for an attribute_type
|
`category_code` VARCHAR(10) NULL DEFAULT NULL,-- defines a category for an attribute_type
|
||||||
`class` VARCHAR(255) NOT NULL DEFAULT '',-- defines a class for an attribute_type
|
`class` VARCHAR(255) NOT NULL DEFAULT '',-- defines a class for an attribute_type
|
||||||
PRIMARY KEY (`code`),
|
PRIMARY KEY (`code`),
|
||||||
KEY `auth_val_cat_idx` (`authorised_value_category`)
|
KEY `auth_val_cat_idx` (`authorised_value_category`)
|
||||||
|
|
|
@ -5781,6 +5781,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
|
||||||
SetVersion ($DBversion);
|
SetVersion ($DBversion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$DBversion = "3.09.00.XXX";
|
||||||
|
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
|
||||||
|
$dbh->do("ALTER TABLE borrower_attribute_types MODIFY category_code VARCHAR( 10 ) NULL DEFAULT NULL");
|
||||||
|
print "Upgrade to $DBversion done. (Bug 8002: Update patron attribute types table from varchar(1) to varchar(10) category_code)\nWarning to Koha System Administrators: If you use borrower attributes defined by borrower categories, you have to check your configuration. A bug may have removed your attribute links to borrower categories.\nPlease check, and fix it if necessary.";
|
||||||
|
SetVersion($DBversion);
|
||||||
|
}
|
||||||
|
|
||||||
=head1 FUNCTIONS
|
=head1 FUNCTIONS
|
||||||
|
|
||||||
=head2 TableExists($table)
|
=head2 TableExists($table)
|
||||||
|
|
Loading…
Reference in a new issue