From f35b674d295d3055ebbda249e900e7b6a506a0f7 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 18 Apr 2017 23:02:32 +0000 Subject: [PATCH] [SIGNED-OFF] Bug 14570 - Update Schema Signed-off-by: Kim Peine Signed-off-by: Kyle M Hall --- Koha/Schema/Result/Borrower.pm | 70 ++++++++++++++---------------- Koha/Schema/Result/BorrowerModification.pm | 40 +---------------- Koha/Schema/Result/Deletedborrower.pm | 40 +---------------- 3 files changed, 36 insertions(+), 114 deletions(-) diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm index 547028f..d5a6101 100644 --- a/Koha/Schema/Result/Borrower.pm +++ b/Koha/Schema/Result/Borrower.pm @@ -254,37 +254,11 @@ __PACKAGE__->table("borrowers"); is_nullable: 1 size: 255 -=head2 contactname - - data_type: 'mediumtext' - is_nullable: 1 - -=head2 contactfirstname - - data_type: 'text' - is_nullable: 1 - -=head2 contacttitle - - data_type: 'text' - is_nullable: 1 - -=head2 guarantorid - - data_type: 'integer' - is_nullable: 1 - =head2 borrowernotes data_type: 'mediumtext' is_nullable: 1 -=head2 relationship - - data_type: 'varchar' - is_nullable: 1 - size: 100 - =head2 sex data_type: 'varchar' @@ -547,18 +521,8 @@ __PACKAGE__->add_columns( { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "debarredcomment", { data_type => "varchar", is_nullable => 1, size => 255 }, - "contactname", - { data_type => "mediumtext", is_nullable => 1 }, - "contactfirstname", - { data_type => "text", is_nullable => 1 }, - "contacttitle", - { data_type => "text", is_nullable => 1 }, - "guarantorid", - { data_type => "integer", is_nullable => 1 }, "borrowernotes", { data_type => "mediumtext", is_nullable => 1 }, - "relationship", - { data_type => "varchar", is_nullable => 1, size => 100 }, "sex", { data_type => "varchar", is_nullable => 1, size => 1 }, "password", @@ -1145,6 +1109,36 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 relationships_guarantees + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "relationships_guarantees", + "Koha::Schema::Result::Relationship", + { "foreign.guarantee_id" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + +=head2 relationships_guarantors + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "relationships_guarantors", + "Koha::Schema::Result::Relationship", + { "foreign.guarantor_id" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 reserves Type: has_many @@ -1341,8 +1335,8 @@ Composing rels: L -> ordernumber __PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber"); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-02-10 07:30:06 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:35WEsGd5LmkZ3bB486M1yA +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-04-18 23:02:13 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cQWHRJh+82G6Bn+R5yn2ig __PACKAGE__->belongs_to( "guarantor", diff --git a/Koha/Schema/Result/BorrowerModification.pm b/Koha/Schema/Result/BorrowerModification.pm index af4895a..fbf44c7 100644 --- a/Koha/Schema/Result/BorrowerModification.pm +++ b/Koha/Schema/Result/BorrowerModification.pm @@ -264,37 +264,11 @@ __PACKAGE__->table("borrower_modifications"); is_nullable: 1 size: 255 -=head2 contactname - - data_type: 'mediumtext' - is_nullable: 1 - -=head2 contactfirstname - - data_type: 'text' - is_nullable: 1 - -=head2 contacttitle - - data_type: 'text' - is_nullable: 1 - -=head2 guarantorid - - data_type: 'integer' - is_nullable: 1 - =head2 borrowernotes data_type: 'mediumtext' is_nullable: 1 -=head2 relationship - - data_type: 'varchar' - is_nullable: 1 - size: 100 - =head2 sex data_type: 'varchar' @@ -521,18 +495,8 @@ __PACKAGE__->add_columns( { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "debarredcomment", { data_type => "varchar", is_nullable => 1, size => 255 }, - "contactname", - { data_type => "mediumtext", is_nullable => 1 }, - "contactfirstname", - { data_type => "text", is_nullable => 1 }, - "contacttitle", - { data_type => "text", is_nullable => 1 }, - "guarantorid", - { data_type => "integer", is_nullable => 1 }, "borrowernotes", { data_type => "mediumtext", is_nullable => 1 }, - "relationship", - { data_type => "varchar", is_nullable => 1, size => 100 }, "sex", { data_type => "varchar", is_nullable => 1, size => 1 }, "password", @@ -590,8 +554,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("verification_token", "borrowernumber"); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-12-12 20:04:12 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:IZNhBX5Bj+x4S8JCWG+7lA +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-04-18 23:02:13 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:H1psseFzVAZYCvWtJwrB8w # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Deletedborrower.pm b/Koha/Schema/Result/Deletedborrower.pm index 778705e..17e255a 100644 --- a/Koha/Schema/Result/Deletedborrower.pm +++ b/Koha/Schema/Result/Deletedborrower.pm @@ -252,37 +252,11 @@ __PACKAGE__->table("deletedborrowers"); is_nullable: 1 size: 255 -=head2 contactname - - data_type: 'mediumtext' - is_nullable: 1 - -=head2 contactfirstname - - data_type: 'text' - is_nullable: 1 - -=head2 contacttitle - - data_type: 'text' - is_nullable: 1 - -=head2 guarantorid - - data_type: 'integer' - is_nullable: 1 - =head2 borrowernotes data_type: 'mediumtext' is_nullable: 1 -=head2 relationship - - data_type: 'varchar' - is_nullable: 1 - size: 100 - =head2 sex data_type: 'varchar' @@ -532,18 +506,8 @@ __PACKAGE__->add_columns( { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "debarredcomment", { data_type => "varchar", is_nullable => 1, size => 255 }, - "contactname", - { data_type => "mediumtext", is_nullable => 1 }, - "contactfirstname", - { data_type => "text", is_nullable => 1 }, - "contacttitle", - { data_type => "text", is_nullable => 1 }, - "guarantorid", - { data_type => "integer", is_nullable => 1 }, "borrowernotes", { data_type => "mediumtext", is_nullable => 1 }, - "relationship", - { data_type => "varchar", is_nullable => 1, size => 100 }, "sex", { data_type => "varchar", is_nullable => 1, size => 1 }, "password", @@ -611,8 +575,8 @@ __PACKAGE__->add_columns( ); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-02-10 07:30:06 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:tq4JDUSFKuU5K69TTVSkVg +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-04-18 23:02:13 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yA+G1XIiCqQQpkd6rPUW/Q # You can replace this text with custom code or comments, and it will be preserved on regeneration -- 2.1.4