Bugzilla – Attachment 162914 Details for
Bug 36120
Add pickup locations to bookings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36120: Schema update
Bug-36120-Schema-update.patch (text/plain), 3.12 KB, created by
Martin Renvoize (ashimema)
on 2024-03-07 17:22:02 UTC
(
hide
)
Description:
Bug 36120: Schema update
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-03-07 17:22:02 UTC
Size:
3.12 KB
patch
obsolete
>From 86059c0be89e7dcd39c37aca4fa80c7c034e2f3a Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 7 Mar 2024 17:08:21 +0000 >Subject: [PATCH] Bug 36120: Schema update > >--- > Koha/Schema/Result/Booking.pm | 35 +++++++++++++++++++++++++++++++++-- > Koha/Schema/Result/Branch.pm | 19 +++++++++++++++++-- > 2 files changed, 50 insertions(+), 4 deletions(-) > >diff --git a/Koha/Schema/Result/Booking.pm b/Koha/Schema/Result/Booking.pm >index 4c3a9715290..fb5a42b82d1 100644 >--- a/Koha/Schema/Result/Booking.pm >+++ b/Koha/Schema/Result/Booking.pm >@@ -57,6 +57,15 @@ foreign key from the biblio table defining which bib record this booking is on > > foreign key from the items table defining the specific item the patron has placed a booking for > >+=head2 pickup_library_id >+ >+ data_type: 'varchar' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ size: 10 >+ >+Identifier for booking pickup library >+ > =head2 start_date > > data_type: 'datetime' >@@ -94,6 +103,8 @@ __PACKAGE__->add_columns( > }, > "item_id", > { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, >+ "pickup_library_id", >+ { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, > "start_date", > { > data_type => "datetime", >@@ -172,9 +183,29 @@ __PACKAGE__->belongs_to( > { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, > ); > >+=head2 pickup_library >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Branch> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "pickup_library", >+ "Koha::Schema::Result::Branch", >+ { branchcode => "pickup_library_id" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "CASCADE", >+ on_update => "CASCADE", >+ }, >+); >+ > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-11-04 10:01:46 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:LoOYu7IflBkC4+VUZLd+Tg >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2024-03-07 17:07:54 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:IEYMaWaOX+bQpm36pdTfyg > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/Branch.pm b/Koha/Schema/Result/Branch.pm >index 39c6ce72d3d..40cd53d75ff 100644 >--- a/Koha/Schema/Result/Branch.pm >+++ b/Koha/Schema/Result/Branch.pm >@@ -380,6 +380,21 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 bookings >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::Booking> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "bookings", >+ "Koha::Schema::Result::Booking", >+ { "foreign.pickup_library_id" => "self.branchcode" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 borrower_attribute_types_branches > > Type: has_many >@@ -951,8 +966,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-10-19 18:12:48 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZN7YtRwqkiYZYU1U+Yi+SA >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2024-03-07 17:07:54 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Tmo9KwezFcO4782RG2M+Hw > > __PACKAGE__->add_columns( > '+pickup_location' => { is_boolean => 1 }, >-- >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 36120
:
162911
|
162912
|
162914
|
162915
|
162916
|
162917
|
162918
|
162919
|
162920
|
162921
|
162922
|
162923
|
162924
|
162925
|
162926
|
162927
|
162928
|
162976
|
163218
|
163219
|
163220
|
163221
|
163222
|
163223
|
163224
|
163435
|
163436
|
163437
|
163438
|
163439
|
163440
|
163441
|
163442
|
163443
|
163444
|
163445
|
163446
|
163447
|
163448
|
163565
|
163566
|
163567
|
163568
|
163569
|
163570
|
163571
|
163603
|
163604
|
163605
|
163606
|
163607
|
163608
|
163609
|
163610
|
163611
|
163612
|
163613
|
163635
|
163636
|
165140
|
165175
|
165176
|
165177
|
165178
|
165179
|
165180
|
165181
|
165182
|
165183
|
165184
|
165185
|
165186
|
165187
|
165188
|
165214
|
165215
|
165216
|
165419
|
165420
|
165421
|
165422
|
165423
|
165424
|
165425
|
165426
|
165427
|
165428
|
165429
|
165430
|
165431
|
165432
|
165433
|
165434
|
165435
|
165984
|
165985
|
165986
|
165987
|
165988
|
165989
|
165990
|
165991
|
165992
|
165993
|
165994
|
165995
|
165996
|
165997
|
165998
|
165999
|
166000
|
166001
|
166002