Bugzilla – Attachment 164517 Details for
Bug 6796
Overnight checkouts taking into account opening and closing hours
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6796: Updated schema files
Bug-6796-Updated-schema-files.patch (text/plain), 3.42 KB, created by
Martin Renvoize (ashimema)
on 2024-04-08 14:36:46 UTC
(
hide
)
Description:
Bug 6796: Updated schema files
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-04-08 14:36:46 UTC
Size:
3.42 KB
patch
obsolete
>From 03a99d6c017ce1742a248eea5b7e64fcbabe3d5a Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Sun, 8 Oct 2023 23:45:32 +0000 >Subject: [PATCH] Bug 6796: Updated schema files > >--- > Koha/Schema/Result/Branch.pm | 19 +++++- > Koha/Schema/Result/LibraryHour.pm | 105 ++++++++++++++++++++++++++++++ > 2 files changed, 122 insertions(+), 2 deletions(-) > create mode 100644 Koha/Schema/Result/LibraryHour.pm > >diff --git a/Koha/Schema/Result/Branch.pm b/Koha/Schema/Result/Branch.pm >index 3a21ff7e1e7..978abcd20cf 100644 >--- a/Koha/Schema/Result/Branch.pm >+++ b/Koha/Schema/Result/Branch.pm >@@ -800,6 +800,21 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 library_hours >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::LibraryHour> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "library_hours", >+ "Koha::Schema::Result::LibraryHour", >+ { "foreign.library_id" => "self.branchcode" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 library_smtp_server > > Type: might_have >@@ -966,8 +981,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2024-04-05 06:44:56 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hNniM1Slml6YGmpEa3MJ1w >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-10-09 04:50:00 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hLjXBe4fcWRqiubm5JXcfA > > __PACKAGE__->add_columns( > '+pickup_location' => { is_boolean => 1 }, >diff --git a/Koha/Schema/Result/LibraryHour.pm b/Koha/Schema/Result/LibraryHour.pm >new file mode 100644 >index 00000000000..944b69b5a73 >--- /dev/null >+++ b/Koha/Schema/Result/LibraryHour.pm >@@ -0,0 +1,105 @@ >+use utf8; >+package Koha::Schema::Result::LibraryHour; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::LibraryHour >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<library_hours> >+ >+=cut >+ >+__PACKAGE__->table("library_hours"); >+ >+=head1 ACCESSORS >+ >+=head2 library_id >+ >+ data_type: 'varchar' >+ is_foreign_key: 1 >+ is_nullable: 0 >+ size: 10 >+ >+=head2 day >+ >+ data_type: 'enum' >+ default_value: 0 >+ extra: {list => [0,1,2,3,4,5,6]} >+ is_nullable: 0 >+ >+=head2 open_time >+ >+ data_type: 'time' >+ is_nullable: 1 >+ >+=head2 close_time >+ >+ data_type: 'time' >+ is_nullable: 1 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "library_id", >+ { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 }, >+ "day", >+ { >+ data_type => "enum", >+ default_value => 0, >+ extra => { list => [0 .. 6] }, >+ is_nullable => 0, >+ }, >+ "open_time", >+ { data_type => "time", is_nullable => 1 }, >+ "close_time", >+ { data_type => "time", is_nullable => 1 }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</library_id> >+ >+=item * L</day> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("library_id", "day"); >+ >+=head1 RELATIONS >+ >+=head2 library >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Branch> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "library", >+ "Koha::Schema::Result::Branch", >+ { branchcode => "library_id" }, >+ { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-10-09 04:50:00 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+HaRcwTHecetQRA+fNytTw >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+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 6796
:
124669
|
124670
|
124671
|
124672
|
134323
|
134324
|
134325
|
134326
|
134327
|
145669
|
145670
|
145671
|
145672
|
145673
|
146988
|
146989
|
146990
|
146991
|
146992
|
150442
|
150443
|
150444
|
150445
|
150446
|
150447
|
150448
|
150477
|
150478
|
153252
|
153253
|
153254
|
153255
|
153256
|
153257
|
153258
|
153259
|
153260
|
153261
|
153271
|
153272
|
153273
|
153274
|
153275
|
153276
|
153277
|
153278
|
153279
|
153280
|
156772
|
156773
|
156774
|
156775
|
156776
|
156777
|
156778
|
156779
|
156780
|
161970
|
161971
|
161972
|
161973
|
161974
|
161975
|
161976
|
161977
|
161978
|
161979
|
161980
|
161986
|
161987
|
161988
|
161989
|
162043
|
162044
|
162045
|
162046
|
162047
|
162048
|
162049
|
162050
|
162051
|
162052
|
162053
|
162054
|
162055
|
162056
|
162090
|
162091
|
162092
|
162093
|
162094
|
162095
|
162096
|
162097
|
162098
|
162099
|
162100
|
162101
|
162102
|
162103
|
162104
|
164511
|
164512
|
164513
|
164514
|
164515
|
164516
|
164517
|
164518
|
164538
|
164539
|
164540
|
164541
|
164542
|
164543
|
164544
|
164545
|
164546
|
164547
|
164548
|
164549
|
164550
|
164551
|
164552