Bugzilla – Attachment 56599 Details for
Bug 5670
Housebound Readers Module
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
DO NOT PUSH: Moar Housebound Schema files.
DO-NOT-PUSH-Moar-Housebound-Schema-files.patch (text/plain), 5.11 KB, created by
Jonathan Druart
on 2016-10-17 16:41:59 UTC
(
hide
)
Description:
DO NOT PUSH: Moar Housebound Schema files.
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-10-17 16:41:59 UTC
Size:
5.11 KB
patch
obsolete
>From 4488014ae5e88ba772ca23047e2e85e742bc4d7d Mon Sep 17 00:00:00 2001 >From: Alex Sassmannshausen <alex.sassmannshausen@ptfs-europe.com> >Date: Thu, 13 Oct 2016 10:05:46 +0200 >Subject: [PATCH] DO NOT PUSH: Moar Housebound Schema files. > >* Koha/Schema/Result/Borrower.pm: New method. >* Koha/Schema/Result/HouseboundRole.pm: New file. > >https://bugs.koha-community.org/show_bug.cgi?id=5670 > >Signed-off-by: Claire Gravely <claire_gravely@hotmail.com> >--- > Koha/Schema/Result/Borrower.pm | 68 +++++++++++++++++++++++++-- > Koha/Schema/Result/HouseboundRole.pm | 90 ++++++++++++++++++++++++++++++++++++ > 2 files changed, 154 insertions(+), 4 deletions(-) > create mode 100644 Koha/Schema/Result/HouseboundRole.pm > >diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm >index 8512753..31da066 100644 >--- a/Koha/Schema/Result/Borrower.pm >+++ b/Koha/Schema/Result/Borrower.pm >@@ -419,7 +419,7 @@ __PACKAGE__->table("borrowers"); > data_type: 'timestamp' > datetime_undef_if_invalid: 1 > default_value: current_timestamp >- is_nullable: 0 >+ is_nullable: 1 > > =head2 lastseen > >@@ -608,7 +608,7 @@ __PACKAGE__->add_columns( > data_type => "timestamp", > datetime_undef_if_invalid => 1, > default_value => \"current_timestamp", >- is_nullable => 0, >+ is_nullable => 1, > }, > "lastseen", > { >@@ -898,6 +898,66 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 housebound_profile >+ >+Type: might_have >+ >+Related object: L<Koha::Schema::Result::HouseboundProfile> >+ >+=cut >+ >+__PACKAGE__->might_have( >+ "housebound_profile", >+ "Koha::Schema::Result::HouseboundProfile", >+ { "foreign.borrowernumber" => "self.borrowernumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ >+=head2 housebound_role >+ >+Type: might_have >+ >+Related object: L<Koha::Schema::Result::HouseboundRole> >+ >+=cut >+ >+__PACKAGE__->might_have( >+ "housebound_role", >+ "Koha::Schema::Result::HouseboundRole", >+ { "foreign.borrowernumber_id" => "self.borrowernumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ >+=head2 housebound_visit_chooser_brwnumbers >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::HouseboundVisit> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "housebound_visit_chooser_brwnumbers", >+ "Koha::Schema::Result::HouseboundVisit", >+ { "foreign.chooser_brwnumber" => "self.borrowernumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ >+=head2 housebound_visit_deliverer_brwnumbers >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::HouseboundVisit> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "housebound_visit_deliverer_brwnumbers", >+ "Koha::Schema::Result::HouseboundVisit", >+ { "foreign.deliverer_brwnumber" => "self.borrowernumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 issues > > Type: has_many >@@ -1244,8 +1304,8 @@ Composing rels: L</aqorder_users> -> ordernumber > __PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber"); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-09-13 17:32:29 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:23Yg0CXG1z8f5Bx92JCVoQ >+# Created by DBIx::Class::Schema::Loader v0.07039 @ 2016-10-13 07:29:58 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gTAVqirjg5ZckpVtRTXHOQ > > __PACKAGE__->belongs_to( > "guarantor", >diff --git a/Koha/Schema/Result/HouseboundRole.pm b/Koha/Schema/Result/HouseboundRole.pm >new file mode 100644 >index 0000000..d6abe49 >--- /dev/null >+++ b/Koha/Schema/Result/HouseboundRole.pm >@@ -0,0 +1,90 @@ >+use utf8; >+package Koha::Schema::Result::HouseboundRole; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::HouseboundRole >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<housebound_role> >+ >+=cut >+ >+__PACKAGE__->table("housebound_role"); >+ >+=head1 ACCESSORS >+ >+=head2 borrowernumber_id >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 0 >+ >+=head2 housebound_chooser >+ >+ data_type: 'tinyint' >+ default_value: 0 >+ is_nullable: 0 >+ >+=head2 housebound_deliverer >+ >+ data_type: 'tinyint' >+ default_value: 0 >+ is_nullable: 0 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "borrowernumber_id", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, >+ "housebound_chooser", >+ { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >+ "housebound_deliverer", >+ { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</borrowernumber_id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("borrowernumber_id"); >+ >+=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_id" }, >+ { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07039 @ 2016-10-13 07:29:58 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:oRdlsug404i4vErycF4bgg >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >-- >2.8.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 5670
:
3038
|
22162
|
22163
|
22164
|
22165
|
26816
|
27288
|
50930
|
51377
|
51875
|
54384
|
54385
|
55326
|
55334
|
55335
|
55336
|
55734
|
55735
|
55736
|
55737
|
55738
|
55739
|
55865
|
55866
|
55867
|
55890
|
55891
|
56298
|
56299
|
56300
|
56301
|
56302
|
56308
|
56337
|
56341
|
56346
|
56347
|
56348
|
56349
|
56350
|
56351
|
56352
|
56353
|
56354
|
56355
|
56356
|
56357
|
56358
|
56359
|
56360
|
56361
|
56362
|
56363
|
56364
|
56365
|
56366
|
56367
|
56368
|
56369
|
56580
|
56581
|
56582
|
56583
|
56584
|
56585
|
56586
|
56587
|
56588
|
56589
|
56590
|
56591
|
56592
|
56593
|
56594
|
56595
|
56596
|
56597
|
56598
| 56599 |
56600
|
56601
|
56602
|
56603
|
56604
|
56605
|
56606