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

(-)a/Koha/Schema/Result/BorrowerAttributeType.pm (+4 lines)
Lines 251-256 __PACKAGE__->add_columns( Link Here
251
    '+mandatory' => { is_boolean => 1 },
251
    '+mandatory' => { is_boolean => 1 },
252
);
252
);
253
253
254
__PACKAGE__->add_columns(
255
    '+is_date' => { is_boolean => 1 },
256
);
257
254
sub koha_object_class {
258
sub koha_object_class {
255
    'Koha::Patron::Attribute::Type';
259
    'Koha::Patron::Attribute::Type';
256
}
260
}
(-)a/installer/data/mysql/atomicupdate/bug_32610_patron_attr_type_date.pl (+15 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "32610",
5
    description => "Add option for additional patron attributes of type date",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        unless ( column_exists( 'borrower_attribute_types', 'is_date' ) ) {
10
            $dbh->do(q{ALTER TABLE borrower_attribute_types
11
                    ADD COLUMN `is_date` tinyint(1) NOT NULL default 0 AFTER `unique_id`});
12
            say $out "Added column 'borrower_attribute_types.is_date'";
13
        }
14
    },
15
};
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 1127-1132 CREATE TABLE `borrower_attribute_types` ( Link Here
1127
  `description` varchar(255) NOT NULL COMMENT 'description for each custom field',
1127
  `description` varchar(255) NOT NULL COMMENT 'description for each custom field',
1128
  `repeatable` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines whether one patron/borrower can have multiple values for this custom field  (1 for yes, 0 for no)',
1128
  `repeatable` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines whether one patron/borrower can have multiple values for this custom field  (1 for yes, 0 for no)',
1129
  `unique_id` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if this value needs to be unique (1 for yes, 0 for no)',
1129
  `unique_id` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if this value needs to be unique (1 for yes, 0 for no)',
1130
  `is_date` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if this field is displayed as a date',
1130
  `opac_display` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if this field is visible to patrons on their account in the OPAC (1 for yes, 0 for no)',
1131
  `opac_display` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if this field is visible to patrons on their account in the OPAC (1 for yes, 0 for no)',
1131
  `opac_editable` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if this field is editable by patrons on their account in the OPAC (1 for yes, 0 for no)',
1132
  `opac_editable` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if this field is editable by patrons on their account in the OPAC (1 for yes, 0 for no)',
1132
  `staff_searchable` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if this field is searchable via the patron search in the staff interface (1 for yes, 0 for no)',
1133
  `staff_searchable` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if this field is searchable via the patron search in the staff interface (1 for yes, 0 for no)',
1133
- 

Return to bug 32610