Bugzilla – Attachment 43718 Details for
Bug 14246
Add borrowernumber to koha_news
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14246: Adding Koha::Schema::Result differences
Bug-14246-Adding-KohaSchemaResult-differences.patch (text/plain), 3.30 KB, created by
Mark Tompsett
on 2015-10-21 23:58:32 UTC
(
hide
)
Description:
Bug 14246: Adding Koha::Schema::Result differences
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2015-10-21 23:58:32 UTC
Size:
3.30 KB
patch
obsolete
>From a0c76a2a5fb47d4f21ed569452574efe6c688fd1 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Wed, 21 Oct 2015 19:55:08 -0400 >Subject: [PATCH] Bug 14246: Adding Koha::Schema::Result differences > >Ran misc/devel/update_dbix_class_files.pl as shown on >wiki/Database_updates#updatedatabase.pl >However, only git added Borrower and Opacnews, since >those were the two affected by this patch. >--- > Koha/Schema/Result/Borrower.pm | 19 +++++++++++++++++-- > Koha/Schema/Result/OpacNews.pm | 32 ++++++++++++++++++++++++++++++-- > 2 files changed, 47 insertions(+), 4 deletions(-) > >diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm >index da4e94c..1a7673e 100644 >--- a/Koha/Schema/Result/Borrower.pm >+++ b/Koha/Schema/Result/Borrower.pm >@@ -902,6 +902,21 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 opac_news >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::OpacNews> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "opac_news", >+ "Koha::Schema::Result::OpacNews", >+ { "foreign.borrowernumber" => "self.borrowernumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 patron_list_patrons > > Type: has_many >@@ -1138,8 +1153,8 @@ Composing rels: L</aqorder_users> -> ordernumber > __PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber"); > > >-# Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-10-06 10:38:42 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:AdaMeazHWWCtMM7rvKX9Lg >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-10-21 19:50:05 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QafovaRBnm36nyoyQTGIgQ > > > # You can replace this text with custom content, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/OpacNews.pm b/Koha/Schema/Result/OpacNews.pm >index 8a42467..2a4b80b 100644 >--- a/Koha/Schema/Result/OpacNews.pm >+++ b/Koha/Schema/Result/OpacNews.pm >@@ -75,6 +75,12 @@ __PACKAGE__->table("opac_news"); > data_type: 'integer' > is_nullable: 1 > >+=head2 borrowernumber >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ > =cut > > __PACKAGE__->add_columns( >@@ -104,6 +110,8 @@ __PACKAGE__->add_columns( > { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, > "number", > { data_type => "integer", is_nullable => 1 }, >+ "borrowernumber", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, > ); > > =head1 PRIMARY KEY >@@ -120,6 +128,26 @@ __PACKAGE__->set_primary_key("idnew"); > > =head1 RELATIONS > >+=head2 borrowernumber >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Borrower> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "borrowernumber", >+ "Koha::Schema::Result::Borrower", >+ { borrowernumber => "borrowernumber" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "SET NULL", >+ on_update => "CASCADE", >+ }, >+); >+ > =head2 branchcode > > Type: belongs_to >@@ -141,8 +169,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07025 @ 2014-02-16 23:15:22 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/q+riAqsYmCQkUCUL9MU7g >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-10-21 19:50:05 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QivH1Daozdp0BttbPF6CkA > > > # You can replace this text with custom content, and it will be preserved on regeneration >-- >2.1.4
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 14246
:
39361
|
39413
|
39417
|
39439
|
39521
|
39745
|
39747
|
40125
|
43714
|
43715
|
43716
|
43717
|
43718
|
43719
|
43720
|
43721
|
43722
|
43723
|
43909
|
43910
|
43911
|
43912
|
43913