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

(-)a/Koha/Schema/Result/BorrowerAttributeType.pm (+4 lines)
Lines 165-170 __PACKAGE__->has_many( Link Here
165
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-10-25 20:32:12
165
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-10-25 20:32:12
166
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gsPR8PuUUZHFUkr3MIbTpw
166
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gsPR8PuUUZHFUkr3MIbTpw
167
167
168
__PACKAGE__->add_columns(
169
    '+keep_for_anonymized' => { is_boolean => 1 },
170
);
171
168
sub koha_object_class {
172
sub koha_object_class {
169
    'Koha::Patron::Attribute::Type';
173
    'Koha::Patron::Attribute::Type';
170
}
174
}
(-)a/installer/data/mysql/atomicupdate/bug_XXXXX.perl (+6 lines)
Lines 71-76 if( CheckVersion( $DBversion ) ) { Link Here
71
        |);
71
        |);
72
    }
72
    }
73
73
74
    unless( column_exists('borrower_attribute_types', 'keep_for_anonymized') ) {
75
        $dbh->do(q|
76
            ALTER TABLE borrower_attribute_types ADD COLUMN `keep_for_anonymized` TINYINT(1) NOT NULL DEFAULT 0 AFTER `class`
77
        |);
78
    }
79
74
    # Always end with this (adjust the bug info)
80
    # Always end with this (adjust the bug info)
75
    SetVersion( $DBversion );
81
    SetVersion( $DBversion );
76
    print "Upgrade to $DBversion done (Bug XXXXX - description)\n";
82
    print "Upgrade to $DBversion done (Bug XXXXX - description)\n";
(-)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
  `keep_for_anonymized` tinyint(1) NOT NULL default 0, -- defines if this field is copied to anonymized_borrower_attributes (1 for yes, 0 for no)
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 24151