@@ -, +, @@ database installations --- Koha/Schema/Result/BorrowerAttributeType.pm | 4 ++++ .../bug_32610_patron_attr_type_date.pl | 15 +++++++++++++++ installer/data/mysql/kohastructure.sql | 1 + 3 files changed, 20 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_32610_patron_attr_type_date.pl --- a/Koha/Schema/Result/BorrowerAttributeType.pm +++ a/Koha/Schema/Result/BorrowerAttributeType.pm @@ -251,6 +251,10 @@ __PACKAGE__->add_columns( '+mandatory' => { is_boolean => 1 }, ); +__PACKAGE__->add_columns( + '+is_date' => { is_boolean => 1 }, +); + sub koha_object_class { 'Koha::Patron::Attribute::Type'; } --- a/installer/data/mysql/atomicupdate/bug_32610_patron_attr_type_date.pl +++ a/installer/data/mysql/atomicupdate/bug_32610_patron_attr_type_date.pl @@ -0,0 +1,15 @@ +use Modern::Perl; + +return { + bug_number => "32610", + description => "Add option for additional patron attributes of type date", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + unless ( column_exists( 'borrower_attribute_types', 'is_date' ) ) { + $dbh->do(q{ALTER TABLE borrower_attribute_types + ADD COLUMN `is_date` tinyint(1) NOT NULL default 0 AFTER `unique_id`}); + say $out "Added column 'borrower_attribute_types.is_date'"; + } + }, +}; --- a/installer/data/mysql/kohastructure.sql +++ a/installer/data/mysql/kohastructure.sql @@ -1127,6 +1127,7 @@ CREATE TABLE `borrower_attribute_types` ( `description` varchar(255) NOT NULL COMMENT 'description for each custom field', `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)', `unique_id` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if this value needs to be unique (1 for yes, 0 for no)', + `is_date` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if this field is displayed as a date', `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)', `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)', `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)', --