Bugzilla – Attachment 165854 Details for
Bug 32610
Add ability to specify patron attribute as a date
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32610: Add borrower_attribute_types.is_date to the database
Bug-32610-Add-borrowerattributetypesisdate-to-the-.patch (text/plain), 3.36 KB, created by
Martin Renvoize (ashimema)
on 2024-04-30 11:55:54 UTC
(
hide
)
Description:
Bug 32610: Add borrower_attribute_types.is_date to the database
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-04-30 11:55:54 UTC
Size:
3.36 KB
patch
obsolete
>From 78601ff93c740f653313cad2aaac932203571012 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Sat, 18 Mar 2023 00:08:28 +0000 >Subject: [PATCH] Bug 32610: Add borrower_attribute_types.is_date to the > database > >* Change to kohastructure.sql for new installations >* Atomic database update to add the column for updating > installations > >Signed-off-by: Philip Orr <philip.orr@lmscloud.de> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/Schema/Result/BorrowerAttributeType.pm | 4 ++++ > .../bug_32610_patron_attr_type_date.pl | 17 +++++++++++++++++ > installer/data/mysql/kohastructure.sql | 1 + > 3 files changed, 22 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_32610_patron_attr_type_date.pl > >diff --git a/Koha/Schema/Result/BorrowerAttributeType.pm b/Koha/Schema/Result/BorrowerAttributeType.pm >index ad609f0a789..acafda8c0e8 100644 >--- a/Koha/Schema/Result/BorrowerAttributeType.pm >+++ b/Koha/Schema/Result/BorrowerAttributeType.pm >@@ -260,6 +260,10 @@ __PACKAGE__->add_columns( > '+staff_searchable' => { is_boolean => 1 }, > ); > >+__PACKAGE__->add_columns( >+ '+is_date' => { is_boolean => 1 }, >+); >+ > sub koha_object_class { > 'Koha::Patron::Attribute::Type'; > } >diff --git a/installer/data/mysql/atomicupdate/bug_32610_patron_attr_type_date.pl b/installer/data/mysql/atomicupdate/bug_32610_patron_attr_type_date.pl >new file mode 100755 >index 00000000000..2bc0be55904 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_32610_patron_attr_type_date.pl >@@ -0,0 +1,17 @@ >+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'"; >+ } >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 002dbb1cd4d..28da0c4fe1a 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -1249,6 +1249,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)', >-- >2.44.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 32610
:
148400
|
148401
|
148402
|
148403
|
148404
|
148405
|
148825
|
148826
|
148827
|
148828
|
148829
|
148830
|
157862
|
157863
|
157864
|
157865
|
157866
|
157867
|
157868
|
158994
|
158995
|
158996
|
158997
|
158998
|
158999
|
159000
|
165747
|
165750
| 165854 |
165855
|
165856
|
165857
|
165858
|
165859
|
165860
|
165861
|
165862
|
165863
|
165864
|
165865
|
165925
|
165926