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_pseudonymization' => { 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_24151.perl (+6 lines)
Lines 60-65 if( CheckVersion( $DBversion ) ) { Link Here
60
        |);
60
        |);
61
    }
61
    }
62
62
63
    unless( column_exists('borrower_attribute_types', 'keep_for_pseudonymization') ) {
64
        $dbh->do(q|
65
            ALTER TABLE borrower_attribute_types ADD COLUMN `keep_for_pseudonymization` TINYINT(1) NOT NULL DEFAULT 0 AFTER `class`
66
        |);
67
    }
68
63
    # Always end with this (adjust the bug info)
69
    # Always end with this (adjust the bug info)
64
    SetVersion( $DBversion );
70
    SetVersion( $DBversion );
65
    print "Upgrade to $DBversion done (Bug 24151 - Add pseudonymized_transactions tables and sysprefs for Pseudonymization)\n";
71
    print "Upgrade to $DBversion done (Bug 24151 - Add pseudonymized_transactions tables and sysprefs for Pseudonymization)\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_pseudonymization` 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