Bugzilla – Attachment 60014 Details for
Bug 7534
Add an option on library level to indicate if a library can be chosen as pick-up location
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7534: Add new column "pickup_location" to branches
Bug-7534-Add-new-column-pickuplocation-to-branches.patch (text/plain), 2.81 KB, created by
Lari Taskula
on 2017-02-08 14:51:41 UTC
(
hide
)
Description:
Bug 7534: Add new column "pickup_location" to branches
Filename:
MIME Type:
Creator:
Lari Taskula
Created:
2017-02-08 14:51:41 UTC
Size:
2.81 KB
patch
obsolete
>From b24cd2703654ff3d71741899e2e8ae30d707d4be Mon Sep 17 00:00:00 2001 >From: Lari Taskula <lari.taskula@jns.fi> >Date: Tue, 7 Feb 2017 19:02:57 +0200 >Subject: [PATCH] Bug 7534: Add new column "pickup_location" to branches > >This patch adds a new column "pickup_location" for each library. This value >defines whether a library can be used as a pickup location or not. > >For extended configurability, this flag could perhaps be considered as a part >of issuing rules, but as of now, this patch only offers a simple flag into >each library. This method also allows easy way for REST API to determine valid >pickup locations by querying the /libraries endpoint. > >To test: >1. perl installer/data/mysql/updatedatabase.pl >2. Observe >DEV atomic update: bug_7534.perl >Upgrade to XXX done (Bug 7534 - Let libraries have configuration for pickup locations) >--- > Koha/Schema/Result/Branch.pm | 12 ++++++++++-- > installer/data/mysql/atomicupdate/bug_7534.perl | 7 +++++++ > 2 files changed, 17 insertions(+), 2 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_7534.perl > >diff --git a/Koha/Schema/Result/Branch.pm b/Koha/Schema/Result/Branch.pm >index ec44cde..4394fc3 100644 >--- a/Koha/Schema/Result/Branch.pm >+++ b/Koha/Schema/Result/Branch.pm >@@ -128,6 +128,12 @@ __PACKAGE__->table("branches"); > data_type: 'text' > is_nullable: 1 > >+=head2 pickup_location >+ >+ data_type: 'integer' >+ default_value: 1 >+ is_nullable: 0 >+ > =cut > > __PACKAGE__->add_columns( >@@ -171,6 +177,8 @@ __PACKAGE__->add_columns( > { data_type => "mediumtext", is_nullable => 1 }, > "opac_info", > { data_type => "text", is_nullable => 1 }, >+ "pickup_location", >+ { data_type => "integer", default_value => 1, is_nullable => 0 }, > ); > > =head1 PRIMARY KEY >@@ -543,8 +551,8 @@ Composing rels: L</branchrelations> -> categorycode > __PACKAGE__->many_to_many("categorycodes", "branchrelations", "categorycode"); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-10-24 13:56:21 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/9YwsU+GXK+fzc6IX2Tj5g >+# Created by DBIx::Class::Schema::Loader v0.07039 @ 2017-02-07 19:53:28 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:p0gmtxzcyjb8JetqS+RsDg > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >diff --git a/installer/data/mysql/atomicupdate/bug_7534.perl b/installer/data/mysql/atomicupdate/bug_7534.perl >new file mode 100644 >index 0000000..d7af27e >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_7534.perl >@@ -0,0 +1,7 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ $dbh->do( "ALTER TABLE branches ADD COLUMN pickup_location int not null default 1" ); >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 7534 - Let libraries have configuration for pickup locations)\n"; >+} >-- >1.9.1
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 7534
:
60014
|
60015
|
60016
|
60017
|
60018
|
60022
|
60023
|
60781
|
60794
|
60795
|
60796
|
60797
|
60798
|
60799
|
60878
|
60879
|
60880
|
60881
|
60882
|
60883
|
61044
|
61045
|
61046
|
61047
|
61273
|
61274
|
61275
|
61276
|
61277
|
61278
|
61279
|
61280
|
77847
|
77848
|
77849
|
77850
|
77851
|
77852
|
77853
|
77854
|
77855
|
77856
|
78160
|
78161
|
78162
|
78163
|
78164
|
78165
|
78166
|
78167
|
78168
|
78169
|
78170
|
78171
|
78477
|
78478
|
78479
|
78480
|
78481
|
78482
|
78483
|
78484
|
78485
|
78486
|
78487
|
78488
|
78489
|
78495
|
78540
|
78548
|
84852