Bugzilla – Attachment 120131 Details for
Bug 14237
Allow bibs to be added to course without items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14237: Schema updates
Bug-14237-Schema-updates.patch (text/plain), 3.55 KB, created by
Kyle M Hall (khall)
on 2021-04-23 17:48:06 UTC
(
hide
)
Description:
Bug 14237: Schema updates
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2021-04-23 17:48:06 UTC
Size:
3.55 KB
patch
obsolete
>From a574ef9d4121c0f46b64a08b7a9d59929fd21aa5 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Wed, 3 Feb 2021 10:04:30 +1300 >Subject: [PATCH] Bug 14237: Schema updates >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > Koha/Schema/Result/Biblio.pm | 19 +++++++++++++++-- > Koha/Schema/Result/CourseItem.pm | 36 +++++++++++++++++++++++++++----- > 2 files changed, 48 insertions(+), 7 deletions(-) > >diff --git a/Koha/Schema/Result/Biblio.pm b/Koha/Schema/Result/Biblio.pm >index 74a46419b4..dd14f2d807 100644 >--- a/Koha/Schema/Result/Biblio.pm >+++ b/Koha/Schema/Result/Biblio.pm >@@ -270,6 +270,21 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 course_items >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::CourseItem> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "course_items", >+ "Koha::Schema::Result::CourseItem", >+ { "foreign.biblionumber" => "self.biblionumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 cover_images > > Type: has_many >@@ -481,8 +496,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nmmsZusHYNAMimE9sImSNg >+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2021-02-03 10:03:26 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YVZN5K/K1v7Kj2yYGwT2CQ > > __PACKAGE__->has_many( > "biblioitem", >diff --git a/Koha/Schema/Result/CourseItem.pm b/Koha/Schema/Result/CourseItem.pm >index de50b7987e..0cf436962d 100644 >--- a/Koha/Schema/Result/CourseItem.pm >+++ b/Koha/Schema/Result/CourseItem.pm >@@ -35,9 +35,13 @@ course item id > > data_type: 'integer' > is_foreign_key: 1 >- is_nullable: 0 >+ is_nullable: 1 >+ >+=head2 biblionumber > >-items.itemnumber for the item on reserve >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 0 > > =head2 itype > >@@ -184,6 +188,8 @@ __PACKAGE__->add_columns( > "ci_id", > { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, > "itemnumber", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, >+ "biblionumber", > { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, > "itype", > { data_type => "varchar", is_nullable => 1, size => 10 }, >@@ -259,6 +265,21 @@ __PACKAGE__->add_unique_constraint("itemnumber", ["itemnumber"]); > > =head1 RELATIONS > >+=head2 biblionumber >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Biblio> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "biblionumber", >+ "Koha::Schema::Result::Biblio", >+ { biblionumber => "biblionumber" }, >+ { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >+); >+ > =head2 course_reserves > > Type: has_many >@@ -346,12 +367,17 @@ __PACKAGE__->belongs_to( > "itemnumber", > "Koha::Schema::Result::Item", > { itemnumber => "itemnumber" }, >- { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "CASCADE", >+ on_update => "CASCADE", >+ }, > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:g97N0MosrfgL6Jg3NVJUFA >+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2021-02-03 10:03:26 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kImBuor/tqSbLlPDt+d2fg > > __PACKAGE__->add_columns( > '+itype_enabled' => { is_boolean => 1 }, >-- >2.24.3 (Apple Git-128)
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 14237
:
116236
|
116237
|
116238
|
116239
|
116240
|
116535
|
116619
|
116638
|
116652
|
116653
|
116654
|
118220
|
118221
|
118222
|
118223
|
120128
|
120129
|
120130
|
120131
|
120132
|
120652
|
120659
|
121876
|
121877
|
121878
|
121879
|
121880
|
121881