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

(-)a/Koha/Schema/Result/BorrowerAttributeType.pm (+4 lines)
Lines 260-265 __PACKAGE__->add_columns( Link Here
260
    '+staff_searchable'          => { is_boolean => 1 },
260
    '+staff_searchable'          => { is_boolean => 1 },
261
);
261
);
262
262
263
__PACKAGE__->add_columns(
264
    '+is_date' => { is_boolean => 1 },
265
);
266
263
sub koha_object_class {
267
sub koha_object_class {
264
    'Koha::Patron::Attribute::Type';
268
    'Koha::Patron::Attribute::Type';
265
}
269
}
(-)a/installer/data/mysql/atomicupdate/bug_32610_patron_attr_type_date.pl (+17 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(
11
                q{ALTER TABLE borrower_attribute_types
12
                    ADD COLUMN `is_date` tinyint(1) NOT NULL default 0 AFTER `unique_id`}
13
            );
14
            say $out "Added column 'borrower_attribute_types.is_date'";
15
        }
16
    },
17
};
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 1249-1254 CREATE TABLE `borrower_attribute_types` ( Link Here
1249
  `description` varchar(255) NOT NULL COMMENT 'description for each custom field',
1249
  `description` varchar(255) NOT NULL COMMENT 'description for each custom field',
1250
  `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)',
1250
  `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)',
1251
  `unique_id` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if this value needs to be unique (1 for yes, 0 for no)',
1251
  `unique_id` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if this value needs to be unique (1 for yes, 0 for no)',
1252
  `is_date` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if this field is displayed as a date',
1252
  `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)',
1253
  `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)',
1253
  `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)',
1254
  `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)',
1254
  `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)',
1255
  `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)',
1255
- 

Return to bug 32610