Bugzilla – Attachment 79286 Details for
Bug 21401
Account offsets should save the transacting library
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21401: Update schema
Bug-21401-Update-schema.patch (text/plain), 3.08 KB, created by
Michal Denar
on 2018-09-24 09:46:42 UTC
(
hide
)
Description:
Bug 21401: Update schema
Filename:
MIME Type:
Creator:
Michal Denar
Created:
2018-09-24 09:46:42 UTC
Size:
3.08 KB
patch
obsolete
>From 9093071a7c68cf2ed37ef5d35a755fd17c28f11c Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Mon, 24 Sep 2018 07:04:15 +0000 >Subject: [PATCH] Bug 21401: Update schema > >Signed-off-by: Your Full Name <your_email> > >Signed-off-by: Your Full Name <your_email> >--- > Koha/Schema/Result/AccountOffset.pm | 33 +++++++++++++++++++++++++++++++-- > Koha/Schema/Result/Branch.pm | 19 +++++++++++++++++-- > 2 files changed, 48 insertions(+), 4 deletions(-) > >diff --git a/Koha/Schema/Result/AccountOffset.pm b/Koha/Schema/Result/AccountOffset.pm >index 892c095..42d457c 100644 >--- a/Koha/Schema/Result/AccountOffset.pm >+++ b/Koha/Schema/Result/AccountOffset.pm >@@ -61,6 +61,13 @@ __PACKAGE__->table("account_offsets"); > default_value: current_timestamp > is_nullable: 0 > >+=head2 transaction_library >+ >+ data_type: 'varchar' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ size: 10 >+ > =cut > > __PACKAGE__->add_columns( >@@ -81,6 +88,8 @@ __PACKAGE__->add_columns( > default_value => \"current_timestamp", > is_nullable => 0, > }, >+ "transaction_library", >+ { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, > ); > > =head1 PRIMARY KEY >@@ -137,6 +146,26 @@ __PACKAGE__->belongs_to( > }, > ); > >+=head2 transaction_library >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Branch> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "transaction_library", >+ "Koha::Schema::Result::Branch", >+ { branchcode => "transaction_library" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "CASCADE", >+ on_update => "CASCADE", >+ }, >+); >+ > =head2 type > > Type: belongs_to >@@ -153,8 +182,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-10-20 16:27:04 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:tPPrIug2c7PbDO7LCxCJAA >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-09-24 06:47:56 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:l4H08mo7riljgHp4ao3uzA > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/Branch.pm b/Koha/Schema/Result/Branch.pm >index b85094b..4a2cf7a 100644 >--- a/Koha/Schema/Result/Branch.pm >+++ b/Koha/Schema/Result/Branch.pm >@@ -211,6 +211,21 @@ __PACKAGE__->set_primary_key("branchcode"); > > =head1 RELATIONS > >+=head2 account_offsets >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::AccountOffset> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "account_offsets", >+ "Koha::Schema::Result::AccountOffset", >+ { "foreign.transaction_library" => "self.branchcode" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 aqbaskets > > Type: has_many >@@ -617,8 +632,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-09-06 16:28:49 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:N0tdcSAb4bMht/i0chipYQ >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-09-24 06:47:56 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5gFVB/eeFmxQ65hgjr1ygQ > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >-- >2.1.4
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 21401
:
79272
|
79273
|
79274
|
79275
|
79284
|
79285
|
79286
|
79287
|
79288
|
79688
|
80355
|
80356
|
80357
|
80358