From d71d94d48f8b1b23caa42cade39bb5927c330148 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 17 Jul 2018 14:15:52 +0000 Subject: [PATCH] Bug 21082: DO NOT PUSH - Schema changes --- Koha/Schema/Result/Branch.pm | 19 +++++++- Koha/Schema/Result/BranchesOverdrive.pm | 83 +++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+), 2 deletions(-) create mode 100644 Koha/Schema/Result/BranchesOverdrive.pm diff --git a/Koha/Schema/Result/Branch.pm b/Koha/Schema/Result/Branch.pm index bb571b1..0aa207a 100644 --- a/Koha/Schema/Result/Branch.pm +++ b/Koha/Schema/Result/Branch.pm @@ -308,6 +308,21 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 branches_overdrive + +Type: might_have + +Related object: L + +=cut + +__PACKAGE__->might_have( + "branches_overdrive", + "Koha::Schema::Result::BranchesOverdrive", + { "foreign.branchcode" => "self.branchcode" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 branchtransfers_frombranches Type: has_many @@ -609,8 +624,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QOMUFz2EjvAVWCkIpNmvtg +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-05-16 12:32:54 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:l8vt6BJ+9mPgOSm60CL+hA # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/BranchesOverdrive.pm b/Koha/Schema/Result/BranchesOverdrive.pm new file mode 100644 index 0000000..c344552 --- /dev/null +++ b/Koha/Schema/Result/BranchesOverdrive.pm @@ -0,0 +1,83 @@ +use utf8; +package Koha::Schema::Result::BranchesOverdrive; + +# Created by DBIx::Class::Schema::Loader +# DO NOT MODIFY THE FIRST PART OF THIS FILE + +=head1 NAME + +Koha::Schema::Result::BranchesOverdrive + +=cut + +use strict; +use warnings; + +use base 'DBIx::Class::Core'; + +=head1 TABLE: C + +=cut + +__PACKAGE__->table("branches_overdrive"); + +=head1 ACCESSORS + +=head2 branchcode + + data_type: 'varchar' + is_foreign_key: 1 + is_nullable: 0 + size: 10 + +=head2 authname + + data_type: 'varchar' + is_nullable: 0 + size: 255 + +=cut + +__PACKAGE__->add_columns( + "branchcode", + { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 }, + "authname", + { data_type => "varchar", is_nullable => 0, size => 255 }, +); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + +__PACKAGE__->set_primary_key("branchcode"); + +=head1 RELATIONS + +=head2 branchcode + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "branchcode", + "Koha::Schema::Result::Branch", + { branchcode => "branchcode" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, +); + + +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-05-16 12:32:54 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wbyAXOyddrUAkAkhLyjLlA + + +# You can replace this text with custom code or comments, and it will be preserved on regeneration +1; -- 2.1.4