Bugzilla – Attachment 42221 Details for
Bug 14205
Deleting an Item/Record does not remove link to course reserve
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14205: (RM followup) DBIx updates
Bug-14205-RM-followup-DBIx-updates.patch (text/plain), 3.03 KB, created by
Tomás Cohen Arazi (tcohen)
on 2015-09-02 12:50:10 UTC
(
hide
)
Description:
Bug 14205: (RM followup) DBIx updates
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2015-09-02 12:50:10 UTC
Size:
3.03 KB
patch
obsolete
>From daaf919f33222433db0dee78c6e5da92e8f9e5a5 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@unc.edu.ar> >Date: Wed, 2 Sep 2015 09:49:41 -0300 >Subject: [PATCH] Bug 14205: (RM followup) DBIx updates > >Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar> >--- > Koha/Schema/Result/CourseItem.pm | 19 +++++++++++++++++-- > Koha/Schema/Result/CourseReserve.pm | 22 +++++++++++++++++++--- > 2 files changed, 36 insertions(+), 5 deletions(-) > >diff --git a/Koha/Schema/Result/CourseItem.pm b/Koha/Schema/Result/CourseItem.pm >index a37263d..1766302 100644 >--- a/Koha/Schema/Result/CourseItem.pm >+++ b/Koha/Schema/Result/CourseItem.pm >@@ -133,6 +133,21 @@ __PACKAGE__->add_unique_constraint("itemnumber", ["itemnumber"]); > > =head1 RELATIONS > >+=head2 course_reserves >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::CourseReserve> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "course_reserves", >+ "Koha::Schema::Result::CourseReserve", >+ { "foreign.ci_id" => "self.ci_id" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 holdingbranch > > Type: belongs_to >@@ -169,8 +184,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:iVWZfUWcPfrLdLdvjyvbow >+# Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-09-02 09:46:54 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:g5lEeHNvnM4KIb6AJUxDOw > > > # You can replace this text with custom content, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/CourseReserve.pm b/Koha/Schema/Result/CourseReserve.pm >index 9cfdfab..ed930c9 100644 >--- a/Koha/Schema/Result/CourseReserve.pm >+++ b/Koha/Schema/Result/CourseReserve.pm >@@ -38,6 +38,7 @@ __PACKAGE__->table("course_reserves"); > =head2 ci_id > > data_type: 'integer' >+ is_foreign_key: 1 > is_nullable: 0 > > =head2 staff_note >@@ -65,7 +66,7 @@ __PACKAGE__->add_columns( > "course_id", > { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, > "ci_id", >- { data_type => "integer", is_nullable => 0 }, >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, > "staff_note", > { data_type => "mediumtext", is_nullable => 1 }, > "public_note", >@@ -109,6 +110,21 @@ __PACKAGE__->add_unique_constraint("pseudo_key", ["course_id", "ci_id"]); > > =head1 RELATIONS > >+=head2 ci >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::CourseItem> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "ci", >+ "Koha::Schema::Result::CourseItem", >+ { ci_id => "ci_id" }, >+ { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >+); >+ > =head2 course > > Type: belongs_to >@@ -125,8 +141,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-07-11 09:26:55 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SSTJhsNOuUlxr/CsDs08pQ >+# Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-09-02 09:46:54 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4RbSgGvSM5wH1jpE+deLlA > > > # You can replace this text with custom content, and it will be preserved on regeneration >-- >2.5.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 14205
:
41335
|
41390
|
42190
| 42221