Bugzilla – Attachment 122764 Details for
Bug 25260
Merge 'reserves' and 'old_reserves' into a new 'holds' table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25260: Schema files
Bug-25260-Schema-files.patch (text/plain), 8.58 KB, created by
Tomás Cohen Arazi (tcohen)
on 2021-07-11 23:41:12 UTC
(
hide
)
Description:
Bug 25260: Schema files
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2021-07-11 23:41:12 UTC
Size:
8.58 KB
patch
obsolete
>From 6ac829751d549c7f93d9edd794e6c8cd0c2823d4 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 23 Dec 2020 15:18:05 -0300 >Subject: [PATCH] Bug 25260: Schema files > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/Schema/Result/Biblio.pm | 37 ++++++++----------------- > Koha/Schema/Result/Branch.pm | 34 +++++++++++------------ > Koha/Schema/Result/Desk.pm | 12 ++++----- > Koha/Schema/Result/Item.pm | 49 ++++++++++++---------------------- > Koha/Schema/Result/Itemtype.pm | 43 ++++++++++------------------- > 5 files changed, 65 insertions(+), 110 deletions(-) > >diff --git a/Koha/Schema/Result/Biblio.pm b/Koha/Schema/Result/Biblio.pm >index 74a46419b4..9a42467ba4 100644 >--- a/Koha/Schema/Result/Biblio.pm >+++ b/Koha/Schema/Result/Biblio.pm >@@ -300,32 +300,32 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >-=head2 items >+=head2 holds > > Type: has_many > >-Related object: L<Koha::Schema::Result::Item> >+Related object: L<Koha::Schema::Result::Hold> > > =cut > > __PACKAGE__->has_many( >- "items", >- "Koha::Schema::Result::Item", >- { "foreign.biblionumber" => "self.biblionumber" }, >+ "holds", >+ "Koha::Schema::Result::Hold", >+ { "foreign.biblio_id" => "self.biblionumber" }, > { cascade_copy => 0, cascade_delete => 0 }, > ); > >-=head2 old_reserves >+=head2 items > > Type: has_many > >-Related object: L<Koha::Schema::Result::OldReserve> >+Related object: L<Koha::Schema::Result::Item> > > =cut > > __PACKAGE__->has_many( >- "old_reserves", >- "Koha::Schema::Result::OldReserve", >+ "items", >+ "Koha::Schema::Result::Item", > { "foreign.biblionumber" => "self.biblionumber" }, > { cascade_copy => 0, cascade_delete => 0 }, > ); >@@ -345,21 +345,6 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >-=head2 reserves >- >-Type: has_many >- >-Related object: L<Koha::Schema::Result::Reserve> >- >-=cut >- >-__PACKAGE__->has_many( >- "reserves", >- "Koha::Schema::Result::Reserve", >- { "foreign.biblionumber" => "self.biblionumber" }, >- { cascade_copy => 0, cascade_delete => 0 }, >-); >- > =head2 reviews > > Type: has_many >@@ -481,8 +466,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-01-27 19:57:36 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4FwDh5Qc6HTepwRlo7ivhQ > > __PACKAGE__->has_many( > "biblioitem", >diff --git a/Koha/Schema/Result/Branch.pm b/Koha/Schema/Result/Branch.pm >index 87f4ec190f..b1ad69adbe 100644 >--- a/Koha/Schema/Result/Branch.pm >+++ b/Koha/Schema/Result/Branch.pm >@@ -631,6 +631,21 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 holds >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::Hold> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "holds", >+ "Koha::Schema::Result::Hold", >+ { "foreign.pickup_library_id" => "self.branchcode" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 illrequests > > Type: has_many >@@ -796,21 +811,6 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >-=head2 reserves >- >-Type: has_many >- >-Related object: L<Koha::Schema::Result::Reserve> >- >-=cut >- >-__PACKAGE__->has_many( >- "reserves", >- "Koha::Schema::Result::Reserve", >- { "foreign.branchcode" => "self.branchcode" }, >- { cascade_copy => 0, cascade_delete => 0 }, >-); >- > =head2 special_holidays > > Type: has_many >@@ -887,8 +887,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:Uu8m3hyDhM50oTSeNTJbdg >+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2021-01-27 19:57:36 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:scFksQ0UIScBex3j6VU8bw > > __PACKAGE__->add_columns( > '+pickup_location' => { is_boolean => 1 } >diff --git a/Koha/Schema/Result/Desk.pm b/Koha/Schema/Result/Desk.pm >index 20aae97fe0..446b958c89 100644 >--- a/Koha/Schema/Result/Desk.pm >+++ b/Koha/Schema/Result/Desk.pm >@@ -89,24 +89,24 @@ __PACKAGE__->belongs_to( > { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, > ); > >-=head2 reserves >+=head2 holds > > Type: has_many > >-Related object: L<Koha::Schema::Result::Reserve> >+Related object: L<Koha::Schema::Result::Hold> > > =cut > > __PACKAGE__->has_many( >- "reserves", >- "Koha::Schema::Result::Reserve", >+ "holds", >+ "Koha::Schema::Result::Hold", > { "foreign.desk_id" => "self.desk_id" }, > { cascade_copy => 0, cascade_delete => 0 }, > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7qeCP25arGQpM4xxnTmWbw >+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2021-01-27 19:57:36 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PkVcz/kbAu/zfbtztuJX9Q > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/Item.pm b/Koha/Schema/Result/Item.pm >index 1d818126a4..8f2092c70a 100644 >--- a/Koha/Schema/Result/Item.pm >+++ b/Koha/Schema/Result/Item.pm >@@ -694,6 +694,21 @@ __PACKAGE__->belongs_to( > }, > ); > >+=head2 holds >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::Hold> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "holds", >+ "Koha::Schema::Result::Hold", >+ { "foreign.item_id" => "self.itemnumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 homebranch > > Type: belongs_to >@@ -759,36 +774,6 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >-=head2 old_reserves >- >-Type: has_many >- >-Related object: L<Koha::Schema::Result::OldReserve> >- >-=cut >- >-__PACKAGE__->has_many( >- "old_reserves", >- "Koha::Schema::Result::OldReserve", >- { "foreign.itemnumber" => "self.itemnumber" }, >- { cascade_copy => 0, cascade_delete => 0 }, >-); >- >-=head2 reserves >- >-Type: has_many >- >-Related object: L<Koha::Schema::Result::Reserve> >- >-=cut >- >-__PACKAGE__->has_many( >- "reserves", >- "Koha::Schema::Result::Reserve", >- { "foreign.itemnumber" => "self.itemnumber" }, >- { cascade_copy => 0, cascade_delete => 0 }, >-); >- > =head2 return_claims > > Type: has_many >@@ -850,8 +835,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:U5Tm2JfUnfhACRDJ4SpFgQ >+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2021-01-27 19:57:36 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:WuEFNsbl8eRji9xY1b2MdA > > __PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" ); > >diff --git a/Koha/Schema/Result/Itemtype.pm b/Koha/Schema/Result/Itemtype.pm >index 1e14063e1d..09f279090b 100644 >--- a/Koha/Schema/Result/Itemtype.pm >+++ b/Koha/Schema/Result/Itemtype.pm >@@ -252,47 +252,47 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >-=head2 itemtypes >+=head2 holds > > Type: has_many > >-Related object: L<Koha::Schema::Result::Itemtype> >+Related object: L<Koha::Schema::Result::Hold> > > =cut > > __PACKAGE__->has_many( >- "itemtypes", >- "Koha::Schema::Result::Itemtype", >- { "foreign.parent_type" => "self.itemtype" }, >+ "holds", >+ "Koha::Schema::Result::Hold", >+ { "foreign.item_type" => "self.itemtype" }, > { cascade_copy => 0, cascade_delete => 0 }, > ); > >-=head2 itemtypes_branches >+=head2 itemtypes > > Type: has_many > >-Related object: L<Koha::Schema::Result::ItemtypesBranch> >+Related object: L<Koha::Schema::Result::Itemtype> > > =cut > > __PACKAGE__->has_many( >- "itemtypes_branches", >- "Koha::Schema::Result::ItemtypesBranch", >- { "foreign.itemtype" => "self.itemtype" }, >+ "itemtypes", >+ "Koha::Schema::Result::Itemtype", >+ { "foreign.parent_type" => "self.itemtype" }, > { cascade_copy => 0, cascade_delete => 0 }, > ); > >-=head2 old_reserves >+=head2 itemtypes_branches > > Type: has_many > >-Related object: L<Koha::Schema::Result::OldReserve> >+Related object: L<Koha::Schema::Result::ItemtypesBranch> > > =cut > > __PACKAGE__->has_many( >- "old_reserves", >- "Koha::Schema::Result::OldReserve", >+ "itemtypes_branches", >+ "Koha::Schema::Result::ItemtypesBranch", > { "foreign.itemtype" => "self.itemtype" }, > { cascade_copy => 0, cascade_delete => 0 }, > ); >@@ -317,21 +317,6 @@ __PACKAGE__->belongs_to( > }, > ); > >-=head2 reserves >- >-Type: has_many >- >-Related object: L<Koha::Schema::Result::Reserve> >- >-=cut >- >-__PACKAGE__->has_many( >- "reserves", >- "Koha::Schema::Result::Reserve", >- { "foreign.itemtype" => "self.itemtype" }, >- { cascade_copy => 0, cascade_delete => 0 }, >-); >- > > # Created by DBIx::Class::Schema::Loader v0.07046 @ 2021-04-22 09:12:04 > # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/kFAnQQ7q1KaLJ9h7vk0vg >-- >2.32.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 25260
:
103984
|
103985
|
103986
|
103987
|
103988
|
103989
|
103990
|
103991
|
103992
|
103993
|
104053
|
104054
|
104055
|
104056
|
104057
|
117745
|
117746
|
117747
|
117748
|
117749
|
117750
|
117751
|
122761
|
122762
|
122763
|
122764
|
122765
|
122766
|
122767
|
122787
|
122788
|
122789
|
122790
|
122791
|
122792
|
122793
|
122976
|
122977
|
122978
|
122979
|
122980
|
122981
|
122982
|
122983
|
123071
|
123072
|
123073
|
123074
|
123075
|
123076
|
123077
|
123078
|
123079
|
123080
|
123257
|
123258
|
123259
|
123260
|
123261
|
123396