Bugzilla – Attachment 102672 Details for
Bug 25103
Dynamically add checkout types
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25103: Schema changes
Bug-25103-Schema-changes.patch (text/plain), 4.95 KB, created by
Lari Taskula
on 2020-04-09 20:51:46 UTC
(
hide
)
Description:
Bug 25103: Schema changes
Filename:
MIME Type:
Creator:
Lari Taskula
Created:
2020-04-09 20:51:46 UTC
Size:
4.95 KB
patch
obsolete
>From b7fba40e6f7cf74ca1e7c8411363be91bc784e3c Mon Sep 17 00:00:00 2001 >From: Lari Taskula <lari.taskula@hypernova.fi> >Date: Thu, 9 Apr 2020 20:39:04 +0000 >Subject: [PATCH] Bug 25103: Schema changes > >Sponsored-by: The National Library of Finland >--- > Koha/Schema/Result/AuthorisedValue.pm | 34 +++++++++++++++++++++++++-- > Koha/Schema/Result/Issue.pm | 29 ++++++++++++++++++----- > Koha/Schema/Result/OldIssue.pm | 29 ++++++++++++++++++----- > 3 files changed, 78 insertions(+), 14 deletions(-) > >diff --git a/Koha/Schema/Result/AuthorisedValue.pm b/Koha/Schema/Result/AuthorisedValue.pm >index 1a65d388c9..c623e4fce9 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-09 20:37:10 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2Wzevhr//Lr9VgPd9uHe0g > > > # 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 fed067f64f..e570045386 100644 >--- a/Koha/Schema/Result/Issue.pm >+++ b/Koha/Schema/Result/Issue.pm >@@ -98,10 +98,11 @@ __PACKAGE__->table("issues"); > > =head2 checkout_type > >- data_type: 'enum' >+ data_type: 'varchar' > default_value: 'CHECKOUT' >- extra: {list => ["CHECKOUT","ONSITE"]} >+ is_foreign_key: 1 > is_nullable: 0 >+ size: 80 > > =head2 note > >@@ -169,10 +170,11 @@ __PACKAGE__->add_columns( > }, > "checkout_type", > { >- data_type => "enum", >+ data_type => "varchar", > default_value => "CHECKOUT", >- extra => { list => ["CHECKOUT", "ONSITE"] }, >+ is_foreign_key => 1, > is_nullable => 0, >+ size => 80, > }, > "note", > { data_type => "longtext", is_nullable => 1 }, >@@ -234,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 >@@ -270,8 +287,8 @@ __PACKAGE__->might_have( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07048 @ 2020-04-09 19:47:02 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GIV9oEe2GeiJ/zIg2kZlwA >+# Created by DBIx::Class::Schema::Loader v0.07048 @ 2020-04-09 20:37:11 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KAsgzxUm3iuntNs/rQnBgA > > __PACKAGE__->add_columns( > '+auto_renew' => { is_boolean => 1 } >diff --git a/Koha/Schema/Result/OldIssue.pm b/Koha/Schema/Result/OldIssue.pm >index acf56ee4ae..c7c0e72107 100644 >--- a/Koha/Schema/Result/OldIssue.pm >+++ b/Koha/Schema/Result/OldIssue.pm >@@ -97,10 +97,11 @@ __PACKAGE__->table("old_issues"); > > =head2 checkout_type > >- data_type: 'enum' >+ data_type: 'varchar' > default_value: 'CHECKOUT' >- extra: {list => ["CHECKOUT","ONSITE"]} >+ is_foreign_key: 1 > is_nullable: 0 >+ size: 80 > > =head2 note > >@@ -168,10 +169,11 @@ __PACKAGE__->add_columns( > }, > "checkout_type", > { >- data_type => "enum", >+ data_type => "varchar", > default_value => "CHECKOUT", >- extra => { list => ["CHECKOUT", "ONSITE"] }, >+ is_foreign_key => 1, > is_nullable => 0, >+ size => 80, > }, > "note", > { data_type => "longtext", is_nullable => 1 }, >@@ -219,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 >@@ -240,8 +257,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07048 @ 2020-04-09 19:47:02 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:J7jzh/kOsynQr52uSGxQ/A >+# Created by DBIx::Class::Schema::Loader v0.07048 @ 2020-04-09 20:37:11 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gyjaefP3JtK14XMHw2QyTg > > __PACKAGE__->add_columns( > '+auto_renew' => { is_boolean => 1 } >-- >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 25103
:
102667
|
102668
|
102669
|
102670
|
102671
| 102672 |
102673
|
102674