Bugzilla – Attachment 77072 Details for
Bug 14570
Make it possible to add multiple guarantors to a record
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14570 [QA Followup]: Rename relationships table to borrower_relationships
Bug-14570-QA-Followup-Rename-relationships-table-t.patch (text/plain), 4.84 KB, created by
Kyle M Hall (khall)
on 2018-07-18 13:29:23 UTC
(
hide
)
Description:
Bug 14570 [QA Followup]: Rename relationships table to borrower_relationships
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2018-07-18 13:29:23 UTC
Size:
4.84 KB
patch
obsolete
>From 44a87c9827b8838bcaf9c4e945b0603ab2d08138 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 17 Jul 2018 10:37:59 +0000 >Subject: [PATCH] Bug 14570 [QA Followup]: Rename relationships table to > borrower_relationships > >--- > Koha/Patron/Relationship.pm | 2 +- > Koha/Patron/Relationships.pm | 2 +- > .../Result/{Relationship.pm => BorrowerRelationship.pm} | 12 ++++++------ > installer/data/mysql/atomicupdate/bug_14570.sql | 6 ++++-- > installer/data/mysql/kohastructure.sql | 4 ++-- > 5 files changed, 14 insertions(+), 12 deletions(-) > rename Koha/Schema/Result/{Relationship.pm => BorrowerRelationship.pm} (85%) > >diff --git a/Koha/Patron/Relationship.pm b/Koha/Patron/Relationship.pm >index 2d42ab4e1b..24994aa2b7 100644 >--- a/Koha/Patron/Relationship.pm >+++ b/Koha/Patron/Relationship.pm >@@ -67,7 +67,7 @@ sub guarantee { > =cut > > sub _type { >- return 'Relationship'; >+ return 'BorrowerRelationship'; > } > > 1; >diff --git a/Koha/Patron/Relationships.pm b/Koha/Patron/Relationships.pm >index e9da572878..981ceac5b7 100644 >--- a/Koha/Patron/Relationships.pm >+++ b/Koha/Patron/Relationships.pm >@@ -84,7 +84,7 @@ sub guarantees { > =cut > > sub _type { >- return 'Relationship'; >+ return 'BorrowerRelationship'; > } > > sub object_class { >diff --git a/Koha/Schema/Result/Relationship.pm b/Koha/Schema/Result/BorrowerRelationship.pm >similarity index 85% >rename from Koha/Schema/Result/Relationship.pm >rename to Koha/Schema/Result/BorrowerRelationship.pm >index c815df4df9..5445d44f10 100644 >--- a/Koha/Schema/Result/Relationship.pm >+++ b/Koha/Schema/Result/BorrowerRelationship.pm >@@ -1,12 +1,12 @@ > use utf8; >-package Koha::Schema::Result::Relationship; >+package Koha::Schema::Result::BorrowerRelationship; > > # Created by DBIx::Class::Schema::Loader > # DO NOT MODIFY THE FIRST PART OF THIS FILE > > =head1 NAME > >-Koha::Schema::Result::Relationship >+Koha::Schema::Result::BorrowerRelationship > > =cut > >@@ -15,11 +15,11 @@ use warnings; > > use base 'DBIx::Class::Core'; > >-=head1 TABLE: C<relationships> >+=head1 TABLE: C<borrower_relationships> > > =cut > >-__PACKAGE__->table("relationships"); >+__PACKAGE__->table("borrower_relationships"); > > =head1 ACCESSORS > >@@ -124,8 +124,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-05-03 13:19:34 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2Nv437KMrKHvpQleXLOjYw >+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2018-07-17 11:22:45 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YKFiZSR3WRi1nvtLOdGV9A > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >diff --git a/installer/data/mysql/atomicupdate/bug_14570.sql b/installer/data/mysql/atomicupdate/bug_14570.sql >index 77d1eb7e5f..9c8e987a96 100644 >--- a/installer/data/mysql/atomicupdate/bug_14570.sql >+++ b/installer/data/mysql/atomicupdate/bug_14570.sql >@@ -1,4 +1,4 @@ >-CREATE TABLE `relationships` ( >+CREATE TABLE `borrower_relationships` ( > id INT(11) NOT NULL AUTO_INCREMENT, > guarantor_id INT(11) NULL DEFAULT NULL, > guarantee_id INT(11) NOT NULL, >@@ -12,6 +12,8 @@ CREATE TABLE `relationships` ( > > UPDATE borrowers LEFT JOIN borrowers guarantor ON ( borrowers.guarantorid = guarantor.borrowernumber ) SET borrowers.guarantorid = NULL WHERE guarantor.borrowernumber IS NULL; > >-INSERT INTO relationships ( guarantor_id, guarantee_id, relationship, surname, firstname ) SELECT guarantorid, borrowernumber, relationship, contactname, contactfirstname FROM borrowers WHERE guarantorid IS NOT NULL OR contactname != ""; >+INSERT INTO borrower_relationships ( guarantor_id, guarantee_id, relationship, surname, firstname ) SELECT guarantorid, borrowernumber, relationship, contactname, contactfirstname FROM borrowers WHERE guarantorid IS NOT NULL OR contactname != ""; > > ALTER TABLE borrowers DROP guarantorid, DROP relationship, DROP contactname, DROP contactfirstname, DROP contacttitle; >+ALTER TABLE deletedborrowers DROP guarantorid, DROP relationship, DROP contactname, DROP contactfirstname, DROP contacttitle; >+ALTER TABLE borrowermodification DROP guarantorid, DROP relationship, DROP contactname, DROP contactfirstname, DROP contacttitle; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index f842f80f52..3d04f5b68e 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -4100,8 +4100,8 @@ CREATE TABLE IF NOT EXISTS club_fields ( > -- Table structure for table 'guarantors_guarantees' > -- > >-DROP TABLE IF EXISTS relationships; >-CREATE TABLE `relationships` ( >+DROP TABLE IF EXISTS borrower_relationships; >+CREATE TABLE `borrower_relationships` ( > id INT(11) NOT NULL AUTO_INCREMENT, > guarantor_id INT(11) NULL DEFAULT NULL, > guarantee_id INT(11) NOT NULL, >-- >2.11.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 14570
:
52400
|
52401
|
52402
|
52403
|
52406
|
52407
|
58146
|
58147
|
58159
|
58202
|
58391
|
58399
|
58412
|
58688
|
58689
|
58739
|
58762
|
58763
|
58764
|
58834
|
58835
|
58836
|
58837
|
58838
|
58839
|
58949
|
58950
|
58951
|
58952
|
58953
|
58954
|
58972
|
58973
|
58974
|
58975
|
58976
|
58977
|
58978
|
58979
|
58980
|
62450
|
62451
|
62452
|
64124
|
64125
|
64126
|
71160
|
71161
|
71162
|
71163
|
73283
|
73284
|
73583
|
73584
|
74950
|
74951
|
74952
|
74953
|
74954
|
74976
|
74977
|
74978
|
74979
|
77029
|
77030
|
77031
|
77032
|
77033
|
77034
|
77040
|
77041
|
77042
|
77043
|
77044
|
77045
|
77046
|
77047
|
77048
|
77049
|
77067
|
77068
|
77069
|
77070
|
77071
|
77072
|
77073
|
77074
|
77075
|
77076
|
77077
|
77078
|
77290
|
77291
|
77346
|
77347
|
77348
|
80842
|
80849
|
81932
|
81933
|
85411
|
85412
|
85431
|
89889
|
89890
|
89891
|
89892
|
89909
|
89910
|
89911
|
89912
|
89921
|
89922
|
89929
|
90048
|
91231
|
91439
|
91440
|
91441
|
91442
|
91443
|
91444
|
91445
|
91694
|
91695
|
91696
|
91697
|
91698
|
91699
|
91700
|
92157
|
92158
|
92161
|
92162
|
92163
|
92180
|
92181
|
92182
|
92183
|
92232
|
92233
|
92234
|
92235
|
92277
|
92278
|
92279
|
92280
|
92281
|
92282
|
92283
|
92284
|
92285
|
92286
|
92287
|
92288
|
92289
|
92290
|
92291
|
92292
|
92298
|
92299
|
92300
|
92301
|
92302
|
92303
|
92304
|
92305
|
92306
|
92307
|
92308
|
92309
|
92310
|
92311
|
92312
|
92313
|
92314
|
92315
|
92316
|
92317
|
92318
|
92319
|
92320
|
92321
|
92322
|
92323
|
92324
|
92325
|
92346
|
92347
|
92348
|
92349
|
92350