Bugzilla – Attachment 103589 Details for
Bug 24161
Add ability to track the claim dates of later orders
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24161: DBIC changes
Bug-24161-DBIC-changes.patch (text/plain), 4.82 KB, created by
PTFS Europe Sandboxes
on 2020-04-23 12:21:54 UTC
(
hide
)
Description:
Bug 24161: DBIC changes
Filename:
MIME Type:
Creator:
PTFS Europe Sandboxes
Created:
2020-04-23 12:21:54 UTC
Size:
4.82 KB
patch
obsolete
>From 58b0e130ef1169fdd0545a7f64c8cf98482e8998 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 16 Dec 2019 17:30:55 +0100 >Subject: [PATCH] Bug 24161: DBIC changes > >Sponsored-by: Cork Institute of Technology > >Signed-off-by: Angela O'Connor Desmond <angela.oconnordesmond@staff.ittralee.ie> >--- > Koha/Schema/Result/Aqorder.pm | 39 ++++++++------- > Koha/Schema/Result/AqordersClaim.pm | 96 +++++++++++++++++++++++++++++++++++++ > 2 files changed, 115 insertions(+), 20 deletions(-) > create mode 100644 Koha/Schema/Result/AqordersClaim.pm > >diff --git a/Koha/Schema/Result/Aqorder.pm b/Koha/Schema/Result/Aqorder.pm >index a6ab12cf6a..f036b05fb6 100644 >--- a/Koha/Schema/Result/Aqorder.pm >+++ b/Koha/Schema/Result/Aqorder.pm >@@ -143,7 +143,7 @@ __PACKAGE__->table("aqorders"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 rrp >@@ -271,18 +271,6 @@ __PACKAGE__->table("aqorders"); > data_type: 'tinyint' > is_nullable: 1 > >-=head2 claims_count >- >- data_type: 'integer' >- default_value: 0 >- is_nullable: 1 >- >-=head2 claimed_date >- >- data_type: 'date' >- datetime_undef_if_invalid: 1 >- is_nullable: 1 >- > =head2 subscriptionid > > data_type: 'integer' >@@ -371,7 +359,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "rrp", >@@ -416,10 +404,6 @@ __PACKAGE__->add_columns( > { data_type => "varchar", is_nullable => 1, size => 10 }, > "uncertainprice", > { data_type => "tinyint", is_nullable => 1 }, >- "claims_count", >- { data_type => "integer", default_value => 0, is_nullable => 1 }, >- "claimed_date", >- { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, > "subscriptionid", > { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, > "parent_ordernumber", >@@ -470,6 +454,21 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 aqorders_claims >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::AqordersClaim> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "aqorders_claims", >+ "Koha::Schema::Result::AqordersClaim", >+ { "foreign.ordernumber" => "self.ordernumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 aqorders_items > > Type: has_many >@@ -661,8 +660,8 @@ Composing rels: L</aqorder_users> -> borrowernumber > __PACKAGE__->many_to_many("borrowernumbers", "aqorder_users", "borrowernumber"); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-08-31 11:51:37 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GQEXetlivZm7buQohl8m4A >+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-12-17 14:58:50 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:B/pTQKIu8guDBN3uLBkI6Q > > __PACKAGE__->belongs_to( > "basket", >diff --git a/Koha/Schema/Result/AqordersClaim.pm b/Koha/Schema/Result/AqordersClaim.pm >new file mode 100644 >index 0000000000..8ce00e11b1 >--- /dev/null >+++ b/Koha/Schema/Result/AqordersClaim.pm >@@ -0,0 +1,96 @@ >+use utf8; >+package Koha::Schema::Result::AqordersClaim; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::AqordersClaim >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<aqorders_claims> >+ >+=cut >+ >+__PACKAGE__->table("aqorders_claims"); >+ >+=head1 ACCESSORS >+ >+=head2 id >+ >+ data_type: 'integer' >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+=head2 ordernumber >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 0 >+ >+=head2 claimed_on >+ >+ data_type: 'timestamp' >+ datetime_undef_if_invalid: 1 >+ default_value: 'current_timestamp()' >+ is_nullable: 0 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "id", >+ { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >+ "ordernumber", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, >+ "claimed_on", >+ { >+ data_type => "timestamp", >+ datetime_undef_if_invalid => 1, >+ default_value => "current_timestamp()", >+ is_nullable => 0, >+ }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("id"); >+ >+=head1 RELATIONS >+ >+=head2 ordernumber >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Aqorder> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "ordernumber", >+ "Koha::Schema::Result::Aqorder", >+ { ordernumber => "ordernumber" }, >+ { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-12-16 16:29:06 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:m+0w++NPVQBiveXToQB8wQ >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >-- >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 24161
:
97114
|
97115
|
97116
|
97117
|
97118
|
97119
|
97470
|
97471
|
97472
|
98280
|
98522
|
98523
|
98524
|
98525
|
98526
|
98527
|
102111
|
102112
|
102113
|
102114
|
102115
|
102116
|
102220
|
102222
|
103567
|
103568
|
103569
|
103570
|
103571
|
103588
|
103589
|
103590
|
103591
|
103592
|
103593
|
103594
|
103595
|
104190
|
104191
|
104207
|
104208
|
104209
|
104210
|
104211
|
104212
|
104213
|
104214
|
104215
|
104216
|
104258
|
104259
|
104265
|
104826
|
104848