Bugzilla – Attachment 102589 Details for
Bug 25037
Add checkout_type to checkouts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25037: Schema changes
Bug-25037-Schema-changes.patch (text/plain), 5.36 KB, created by
Lari Taskula
on 2020-04-08 18:34:33 UTC
(
hide
)
Description:
Bug 25037: Schema changes
Filename:
MIME Type:
Creator:
Lari Taskula
Created:
2020-04-08 18:34:33 UTC
Size:
5.36 KB
patch
obsolete
>From d962e4f6dff74528fefdc21f2e06c93e6a1e5256 Mon Sep 17 00:00:00 2001 >From: Lari Taskula <lari.taskula@hypernova.fi> >Date: Wed, 8 Apr 2020 12:45:48 +0000 >Subject: [PATCH] Bug 25037: Schema changes > >Sponsred-by: The National Library of Finland >--- > Koha/Schema/Result/AuthorisedValue.pm | 34 ++++++++++++++++++++++-- > Koha/Schema/Result/Issue.pm | 38 +++++++++++++++++++++------ > Koha/Schema/Result/OldIssue.pm | 38 +++++++++++++++++++++------ > 3 files changed, 92 insertions(+), 18 deletions(-) > >diff --git a/Koha/Schema/Result/AuthorisedValue.pm b/Koha/Schema/Result/AuthorisedValue.pm >index 1a65d388c9..76d19c6067 100644 >--- a/Koha/Schema/Result/AuthorisedValue.pm >+++ b/Koha/Schema/Result/AuthorisedValue.pm >@@ -144,9 +144,39 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 issues > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-02-22 14:32:48 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hDlebhEn+f+thqwBo/LOqQ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::Issue> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "issues", >+ "Koha::Schema::Result::Issue", >+ { "foreign.checkout_type" => "self.authorised_value" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ >+=head2 old_issues >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::OldIssue> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "old_issues", >+ "Koha::Schema::Result::OldIssue", >+ { "foreign.checkout_type" => "self.authorised_value" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07048 @ 2020-04-01 16:24:27 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3/nSpPKD664Mmv6ce/Y1pA > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/Issue.pm b/Koha/Schema/Result/Issue.pm >index 8bb16b6b92..ac9b9fc5e3 100644 >--- a/Koha/Schema/Result/Issue.pm >+++ b/Koha/Schema/Result/Issue.pm >@@ -96,11 +96,13 @@ __PACKAGE__->table("issues"); > datetime_undef_if_invalid: 1 > is_nullable: 1 > >-=head2 onsite_checkout >+=head2 checkout_type > >- data_type: 'integer' >- default_value: 0 >+ data_type: 'varchar' >+ default_value: 'C' >+ is_foreign_key: 1 > is_nullable: 0 >+ size: 80 > > =head2 note > >@@ -166,8 +168,14 @@ __PACKAGE__->add_columns( > datetime_undef_if_invalid => 1, > is_nullable => 1, > }, >- "onsite_checkout", >- { data_type => "integer", default_value => 0, is_nullable => 0 }, >+ "checkout_type", >+ { >+ data_type => "varchar", >+ default_value => "C", >+ is_foreign_key => 1, >+ is_nullable => 0, >+ size => 80, >+ }, > "note", > { data_type => "longtext", is_nullable => 1 }, > "notedate", >@@ -228,6 +236,21 @@ __PACKAGE__->belongs_to( > }, > ); > >+=head2 checkout_type >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::AuthorisedValue> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "checkout_type", >+ "Koha::Schema::Result::AuthorisedValue", >+ { authorised_value => "checkout_type" }, >+ { is_deferrable => 1, on_delete => "RESTRICT", on_update => "CASCADE" }, >+); >+ > =head2 itemnumber > > Type: belongs_to >@@ -264,12 +287,11 @@ __PACKAGE__->might_have( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-31 12:18:38 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QVmFa5b0Pe5OhUI92n9kzQ >+# Created by DBIx::Class::Schema::Loader v0.07048 @ 2020-04-08 16:40:45 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KsHohP+zKd/unLT1QptXsg > > __PACKAGE__->add_columns( > '+auto_renew' => { is_boolean => 1 }, >- '+onsite_checkout' => { is_boolean => 1 } > ); > > __PACKAGE__->belongs_to( >diff --git a/Koha/Schema/Result/OldIssue.pm b/Koha/Schema/Result/OldIssue.pm >index f1ff5c2fa6..a9b8c4b60e 100644 >--- a/Koha/Schema/Result/OldIssue.pm >+++ b/Koha/Schema/Result/OldIssue.pm >@@ -95,11 +95,13 @@ __PACKAGE__->table("old_issues"); > datetime_undef_if_invalid: 1 > is_nullable: 1 > >-=head2 onsite_checkout >+=head2 checkout_type > >- data_type: 'integer' >- default_value: 0 >+ data_type: 'varchar' >+ default_value: 'C' >+ is_foreign_key: 1 > is_nullable: 0 >+ size: 80 > > =head2 note > >@@ -165,8 +167,14 @@ __PACKAGE__->add_columns( > datetime_undef_if_invalid => 1, > is_nullable => 1, > }, >- "onsite_checkout", >- { data_type => "integer", default_value => 0, is_nullable => 0 }, >+ "checkout_type", >+ { >+ data_type => "varchar", >+ default_value => "C", >+ is_foreign_key => 1, >+ is_nullable => 0, >+ size => 80, >+ }, > "note", > { data_type => "longtext", is_nullable => 1 }, > "notedate", >@@ -213,6 +221,21 @@ __PACKAGE__->belongs_to( > }, > ); > >+=head2 checkout_type >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::AuthorisedValue> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "checkout_type", >+ "Koha::Schema::Result::AuthorisedValue", >+ { authorised_value => "checkout_type" }, >+ { is_deferrable => 1, on_delete => "RESTRICT", on_update => "CASCADE" }, >+); >+ > =head2 itemnumber > > Type: belongs_to >@@ -234,12 +257,11 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-04-10 19:55:44 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:E2N2paWcCHg916100ry+2A >+# Created by DBIx::Class::Schema::Loader v0.07048 @ 2020-04-08 16:40:45 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:75LxdVEvKFyi0RFqGzin5g > > __PACKAGE__->add_columns( > '+auto_renew' => { is_boolean => 1 }, >- '+onsite_checkout' => { is_boolean => 1 } > ); > > __PACKAGE__->belongs_to( >-- >2.17.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 25037
:
102259
|
102260
|
102261
|
102262
|
102263
|
102264
|
102265
|
102266
|
102267
|
102268
|
102269
|
102272
|
102413
|
102414
|
102415
|
102416
|
102417
|
102418
|
102419
|
102420
|
102421
|
102422
|
102423
|
102424
|
102586
|
102587
|
102588
|
102589
|
102590
|
102591
|
102592
|
102593
|
102594
|
102595
|
102596
|
102597
|
102598
|
102599
|
102655
|
102656
|
102657
|
102658
|
102659
|
102660
|
102661
|
102662
|
102663
|
102664
|
102665
|
102666
|
102675
|
102676
|
104267
|
104268
|
105638
|
105780
|
105781
|
105782
|
105783
|
105784