Bugzilla – Attachment 134367 Details for
Bug 30291
Rename recalls.* column names
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30291: Updated schema files [DO NOT PUSH]
Bug-30291-Updated-schema-files-DO-NOT-PUSH.patch (text/plain), 11.96 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-04-29 11:34:01 UTC
(
hide
)
Description:
Bug 30291: Updated schema files [DO NOT PUSH]
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-04-29 11:34:01 UTC
Size:
11.96 KB
patch
obsolete
>From 5b485b98accef8ae3922ede5939623dc45096a4c Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Mon, 28 Mar 2022 22:10:40 +1300 >Subject: [PATCH] Bug 30291: Updated schema files [DO NOT PUSH] > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Schema/Result/Biblio.pm | 6 +- > Koha/Schema/Result/Borrower.pm | 6 +- > Koha/Schema/Result/Branch.pm | 6 +- > Koha/Schema/Result/Item.pm | 6 +- > Koha/Schema/Result/Recall.pm | 158 +++++++++++++++++---------------- > 5 files changed, 93 insertions(+), 89 deletions(-) > >diff --git a/Koha/Schema/Result/Biblio.pm b/Koha/Schema/Result/Biblio.pm >index 0efad30daa..ddae29b069 100644 >--- a/Koha/Schema/Result/Biblio.pm >+++ b/Koha/Schema/Result/Biblio.pm >@@ -386,7 +386,7 @@ Related object: L<Koha::Schema::Result::Recall> > __PACKAGE__->has_many( > "recalls", > "Koha::Schema::Result::Recall", >- { "foreign.biblionumber" => "self.biblionumber" }, >+ { "foreign.biblio_id" => "self.biblionumber" }, > { cascade_copy => 0, cascade_delete => 0 }, > ); > >@@ -541,8 +541,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2021-10-14 15:07:03 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6YO2t5VoWcG/tM+8uOP/wg >+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2022-03-28 22:07:59 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sh8waM4ivuiNao0VV5403Q > > __PACKAGE__->has_many( > "biblioitem", >diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm >index 175710d0f5..39ef4fe02d 100644 >--- a/Koha/Schema/Result/Borrower.pm >+++ b/Koha/Schema/Result/Borrower.pm >@@ -1595,7 +1595,7 @@ Related object: L<Koha::Schema::Result::Recall> > __PACKAGE__->has_many( > "recalls", > "Koha::Schema::Result::Recall", >- { "foreign.borrowernumber" => "self.borrowernumber" }, >+ { "foreign.patron_id" => "self.borrowernumber" }, > { cascade_copy => 0, cascade_delete => 0 }, > ); > >@@ -1955,8 +1955,8 @@ Composing rels: L</user_permissions> -> permission > __PACKAGE__->many_to_many("permissions", "user_permissions", "permission"); > > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-03-24 10:20:07 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:srYT5wjg7Jhy5CpmDjWv/g >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-04-29 11:09:16 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pQqp6+XsKkDrnO57fQ9dmg > > __PACKAGE__->has_many( > "extended_attributes", >diff --git a/Koha/Schema/Result/Branch.pm b/Koha/Schema/Result/Branch.pm >index b924c94f98..b2a59b2cbf 100644 >--- a/Koha/Schema/Result/Branch.pm >+++ b/Koha/Schema/Result/Branch.pm >@@ -772,7 +772,7 @@ Related object: L<Koha::Schema::Result::Recall> > __PACKAGE__->has_many( > "recalls", > "Koha::Schema::Result::Recall", >- { "foreign.branchcode" => "self.branchcode" }, >+ { "foreign.pickup_library_id" => "self.branchcode" }, > { cascade_copy => 0, cascade_delete => 0 }, > ); > >@@ -882,8 +882,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2022-02-15 02:16:34 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PR2GOpldAnNtyB2DRLsE9g >+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2022-03-28 22:07:59 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Kpv55lV6FRGoxxu5nufXhg > > __PACKAGE__->add_columns( > '+pickup_location' => { is_boolean => 1 }, >diff --git a/Koha/Schema/Result/Item.pm b/Koha/Schema/Result/Item.pm >index 8be4a775f9..ce96288737 100644 >--- a/Koha/Schema/Result/Item.pm >+++ b/Koha/Schema/Result/Item.pm >@@ -800,7 +800,7 @@ Related object: L<Koha::Schema::Result::Recall> > __PACKAGE__->has_many( > "recalls", > "Koha::Schema::Result::Recall", >- { "foreign.itemnumber" => "self.itemnumber" }, >+ { "foreign.item_id" => "self.itemnumber" }, > { cascade_copy => 0, cascade_delete => 0 }, > ); > >@@ -880,8 +880,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2021-10-14 15:07:03 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yRbholcHil9qRF5t+83jdA >+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2022-03-28 22:07:59 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:28f9/7z3Nq5C4qzBMyceiQ > > __PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" ); > >diff --git a/Koha/Schema/Result/Recall.pm b/Koha/Schema/Result/Recall.pm >index e3415e77c2..8d3bd14005 100644 >--- a/Koha/Schema/Result/Recall.pm >+++ b/Koha/Schema/Result/Recall.pm >@@ -6,7 +6,7 @@ package Koha::Schema::Result::Recall; > > =head1 NAME > >-Koha::Schema::Result::Recall >+Koha::Schema::Result::Recall - Information related to recalls in Koha > > =cut > >@@ -29,49 +29,65 @@ __PACKAGE__->table("recalls"); > is_auto_increment: 1 > is_nullable: 0 > >-=head2 borrowernumber >+Unique identifier for this recall >+ >+=head2 patron_id > > data_type: 'integer' > default_value: 0 > is_foreign_key: 1 > is_nullable: 0 > >-=head2 recalldate >+Identifier for patron who requested recall >+ >+=head2 created_date > > data_type: 'datetime' > datetime_undef_if_invalid: 1 > is_nullable: 1 > >-=head2 biblionumber >+Date the recall was requested >+ >+=head2 biblio_id > > data_type: 'integer' > default_value: 0 > is_foreign_key: 1 > is_nullable: 0 > >-=head2 branchcode >+Identifier for bibliographic record that has been recalled >+ >+=head2 pickup_library_id > > data_type: 'varchar' > is_foreign_key: 1 > is_nullable: 1 > size: 10 > >-=head2 cancellationdate >+Identifier for recall pickup library >+ >+=head2 completed_date > > data_type: 'datetime' > datetime_undef_if_invalid: 1 > is_nullable: 1 > >-=head2 recallnotes >+Date the recall is completed (fulfilled, cancelled or expired) >+ >+=head2 notes > > data_type: 'mediumtext' > is_nullable: 1 > >+Notes related to the recall >+ > =head2 priority > > data_type: 'smallint' > is_nullable: 1 > >+Where in the queue the patron sits >+ > =head2 status > > data_type: 'enum' >@@ -79,6 +95,8 @@ __PACKAGE__->table("recalls"); > extra: {list => ["requested","overdue","waiting","in_transit","cancelled","expired","fulfilled"]} > is_nullable: 1 > >+Status of recall >+ > =head2 timestamp > > data_type: 'timestamp' >@@ -86,70 +104,82 @@ __PACKAGE__->table("recalls"); > default_value: current_timestamp > is_nullable: 0 > >-=head2 itemnumber >+Date and time the recall was last updated >+ >+=head2 item_id > > data_type: 'integer' > is_foreign_key: 1 > is_nullable: 1 > >-=head2 waitingdate >+Identifier for item record that was recalled, if an item-level recall >+ >+=head2 waiting_date > > data_type: 'datetime' > datetime_undef_if_invalid: 1 > is_nullable: 1 > >-=head2 expirationdate >+Date an item was marked as waiting for the patron at the library >+ >+=head2 expiration_date > > data_type: 'datetime' > datetime_undef_if_invalid: 1 > is_nullable: 1 > >-=head2 old >+Date recall is no longer required, or date recall will expire after waiting on shelf for pickup >+ >+=head2 completed > > data_type: 'tinyint' > default_value: 0 > is_nullable: 0 > >-=head2 item_level_recall >+Flag if recall is old and no longer active, i.e. expired, cancelled or completed >+ >+=head2 item_level > > data_type: 'tinyint' > default_value: 0 > is_nullable: 0 > >+Flag if recall is for a specific item >+ > =cut > > __PACKAGE__->add_columns( > "recall_id", > { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >- "borrowernumber", >+ "patron_id", > { > data_type => "integer", > default_value => 0, > is_foreign_key => 1, > is_nullable => 0, > }, >- "recalldate", >+ "created_date", > { > data_type => "datetime", > datetime_undef_if_invalid => 1, > is_nullable => 1, > }, >- "biblionumber", >+ "biblio_id", > { > data_type => "integer", > default_value => 0, > is_foreign_key => 1, > is_nullable => 0, > }, >- "branchcode", >+ "pickup_library_id", > { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, >- "cancellationdate", >+ "completed_date", > { > data_type => "datetime", > datetime_undef_if_invalid => 1, > is_nullable => 1, > }, >- "recallnotes", >+ "notes", > { data_type => "mediumtext", is_nullable => 1 }, > "priority", > { data_type => "smallint", is_nullable => 1 }, >@@ -177,23 +207,23 @@ __PACKAGE__->add_columns( > default_value => \"current_timestamp", > is_nullable => 0, > }, >- "itemnumber", >+ "item_id", > { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, >- "waitingdate", >+ "waiting_date", > { > data_type => "datetime", > datetime_undef_if_invalid => 1, > is_nullable => 1, > }, >- "expirationdate", >+ "expiration_date", > { > data_type => "datetime", > datetime_undef_if_invalid => 1, > is_nullable => 1, > }, >- "old", >+ "completed", > { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >- "item_level_recall", >+ "item_level", > { data_type => "tinyint", default_value => 0, is_nullable => 0 }, > ); > >@@ -211,7 +241,7 @@ __PACKAGE__->set_primary_key("recall_id"); > > =head1 RELATIONS > >-=head2 biblionumber >+=head2 biblio > > Type: belongs_to > >@@ -220,59 +250,59 @@ Related object: L<Koha::Schema::Result::Biblio> > =cut > > __PACKAGE__->belongs_to( >- "biblionumber", >+ "biblio", > "Koha::Schema::Result::Biblio", >- { biblionumber => "biblionumber" }, >+ { biblionumber => "biblio_id" }, > { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, > ); > >-=head2 borrowernumber >+=head2 item > > Type: belongs_to > >-Related object: L<Koha::Schema::Result::Borrower> >+Related object: L<Koha::Schema::Result::Item> > > =cut > > __PACKAGE__->belongs_to( >- "borrowernumber", >- "Koha::Schema::Result::Borrower", >- { borrowernumber => "borrowernumber" }, >- { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >+ "item", >+ "Koha::Schema::Result::Item", >+ { itemnumber => "item_id" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "CASCADE", >+ on_update => "CASCADE", >+ }, > ); > >-=head2 branchcode >+=head2 patron > > Type: belongs_to > >-Related object: L<Koha::Schema::Result::Branch> >+Related object: L<Koha::Schema::Result::Borrower> > > =cut > > __PACKAGE__->belongs_to( >- "branchcode", >- "Koha::Schema::Result::Branch", >- { branchcode => "branchcode" }, >- { >- is_deferrable => 1, >- join_type => "LEFT", >- on_delete => "CASCADE", >- on_update => "CASCADE", >- }, >+ "patron", >+ "Koha::Schema::Result::Borrower", >+ { borrowernumber => "patron_id" }, >+ { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, > ); > >-=head2 itemnumber >+=head2 pickup_library > > Type: belongs_to > >-Related object: L<Koha::Schema::Result::Item> >+Related object: L<Koha::Schema::Result::Branch> > > =cut > > __PACKAGE__->belongs_to( >- "itemnumber", >- "Koha::Schema::Result::Item", >- { itemnumber => "itemnumber" }, >+ "pickup_library", >+ "Koha::Schema::Result::Branch", >+ { branchcode => "pickup_library_id" }, > { > is_deferrable => 1, > join_type => "LEFT", >@@ -282,44 +312,18 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-03-23 19:53:39 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6DbEjtt5g6QY6VuCqrMleg >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-04-29 11:14:14 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lUgwwMxaStiOS7pHL0UGJA > > __PACKAGE__->add_columns( > '+completed' => { is_boolean => 1 }, > '+item_level' => { is_boolean => 1 }, > ); > >-__PACKAGE__->belongs_to( >- "biblio", >- "Koha::Schema::Result::Biblio", >- { biblionumber => "biblionumber" }, >- { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >-); >- >-__PACKAGE__->belongs_to( >- "item", >- "Koha::Schema::Result::Item", >- { itemnumber => "itemnumber" }, >- { >- is_deferrable => 1, >- join_type => "LEFT", >- on_delete => "CASCADE", >- on_update => "CASCADE", >- }, >-); >- >-__PACKAGE__->belongs_to( >- "patron", >- "Koha::Schema::Result::Borrower", >- { borrowernumber => "borrowernumber" }, >- { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >-); >- > __PACKAGE__->belongs_to( > "library", > "Koha::Schema::Result::Branch", >- { branchcode => "branchcode" }, >+ { branchcode => "pickup_library_id" }, > { > is_deferrable => 1, > join_type => "LEFT", >-- >2.34.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 30291
:
132379
|
132380
|
132381
|
132382
|
132383
|
132384
|
132385
|
132386
|
134359
|
134360
|
134361
|
134362
|
134363
|
134364
|
134365
|
134366
|
134367
|
134389
|
134390
|
134391
|
134392
|
134393
|
134394
|
134395
|
134396
|
134397
|
134629
|
134630