From 13f77f05614017a7d1e1927a3404107f928e0c29 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Sun, 25 Mar 2018 21:33:43 +0000 Subject: [PATCH] Bug 14570 - Update Schema --- 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 ca95e4833c..534dd7e14f 100644 --- a/Koha/Schema/Result/Borrower.pm +++ b/Koha/Schema/Result/Borrower.pm @@ -260,37 +260,11 @@ __PACKAGE__->table("borrowers"); is_nullable: 1 size: 255 -=head2 contactname - - data_type: 'longtext' - is_nullable: 1 - -=head2 contactfirstname - - data_type: 'mediumtext' - is_nullable: 1 - -=head2 contacttitle - - data_type: 'mediumtext' - is_nullable: 1 - -=head2 guarantorid - - data_type: 'integer' - is_nullable: 1 - =head2 borrowernotes data_type: 'longtext' is_nullable: 1 -=head2 relationship - - data_type: 'varchar' - is_nullable: 1 - size: 100 - =head2 sex data_type: 'varchar' @@ -568,18 +542,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 => "longtext", is_nullable => 1 }, - "contactfirstname", - { data_type => "mediumtext", is_nullable => 1 }, - "contacttitle", - { data_type => "mediumtext", is_nullable => 1 }, - "guarantorid", - { data_type => "integer", is_nullable => 1 }, "borrowernotes", { data_type => "longtext", is_nullable => 1 }, - "relationship", - { data_type => "varchar", is_nullable => 1, size => 100 }, "sex", { data_type => "varchar", is_nullable => 1, size => 1 }, "password", @@ -1190,6 +1154,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 @@ -1386,8 +1380,8 @@ Composing rels: L -> ordernumber __PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber"); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wM40W+toV8ca5LFwinkHxA +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-03-25 21:32:19 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zQiYI20PSKC7Kub0678iAA __PACKAGE__->add_columns( '+lost' => { is_boolean => 1 }, diff --git a/Koha/Schema/Result/BorrowerModification.pm b/Koha/Schema/Result/BorrowerModification.pm index 013da7753a..bbf93b4f15 100644 --- a/Koha/Schema/Result/BorrowerModification.pm +++ b/Koha/Schema/Result/BorrowerModification.pm @@ -270,37 +270,11 @@ __PACKAGE__->table("borrower_modifications"); is_nullable: 1 size: 255 -=head2 contactname - - data_type: 'longtext' - is_nullable: 1 - -=head2 contactfirstname - - data_type: 'mediumtext' - is_nullable: 1 - -=head2 contacttitle - - data_type: 'mediumtext' - is_nullable: 1 - -=head2 guarantorid - - data_type: 'integer' - is_nullable: 1 - =head2 borrowernotes data_type: 'longtext' is_nullable: 1 -=head2 relationship - - data_type: 'varchar' - is_nullable: 1 - size: 100 - =head2 sex data_type: 'varchar' @@ -529,18 +503,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 => "longtext", is_nullable => 1 }, - "contactfirstname", - { data_type => "mediumtext", is_nullable => 1 }, - "contacttitle", - { data_type => "mediumtext", is_nullable => 1 }, - "guarantorid", - { data_type => "integer", is_nullable => 1 }, "borrowernotes", { data_type => "longtext", is_nullable => 1 }, - "relationship", - { data_type => "varchar", is_nullable => 1, size => 100 }, "sex", { data_type => "varchar", is_nullable => 1, size => 1 }, "password", @@ -598,8 +562,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("verification_token", "borrowernumber"); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Vv0bJqR71Ust1MZAkYqTig +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-03-25 21:32:19 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ACHCqnnVRovCtVOmVZwG3Q # 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 4d15e35c1f..43bebbabc0 100644 --- a/Koha/Schema/Result/Deletedborrower.pm +++ b/Koha/Schema/Result/Deletedborrower.pm @@ -258,37 +258,11 @@ __PACKAGE__->table("deletedborrowers"); is_nullable: 1 size: 255 -=head2 contactname - - data_type: 'longtext' - is_nullable: 1 - -=head2 contactfirstname - - data_type: 'mediumtext' - is_nullable: 1 - -=head2 contacttitle - - data_type: 'mediumtext' - is_nullable: 1 - -=head2 guarantorid - - data_type: 'integer' - is_nullable: 1 - =head2 borrowernotes data_type: 'longtext' is_nullable: 1 -=head2 relationship - - data_type: 'varchar' - is_nullable: 1 - size: 100 - =head2 sex data_type: 'varchar' @@ -553,18 +527,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 => "longtext", is_nullable => 1 }, - "contactfirstname", - { data_type => "mediumtext", is_nullable => 1 }, - "contacttitle", - { data_type => "mediumtext", is_nullable => 1 }, - "guarantorid", - { data_type => "integer", is_nullable => 1 }, "borrowernotes", { data_type => "longtext", is_nullable => 1 }, - "relationship", - { data_type => "varchar", is_nullable => 1, size => 100 }, "sex", { data_type => "varchar", is_nullable => 1, size => 1 }, "password", @@ -641,8 +605,8 @@ __PACKAGE__->add_columns( ); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:DNkNHNcv0lkMH6/seu89hg +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-03-25 21:32:19 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:MXaX5GzSeZh/SkfqNmd5hQ # You can replace this text with custom code or comments, and it will be preserved on regeneration -- 2.15.1 (Apple Git-101)