From bae943ee00e7bcfaa265dbda0f2bcc65eb4ccf28 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 9 Jan 2017 16:20:58 +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 1fe3988..3d357ee 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' @@ -542,18 +516,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", @@ -1138,6 +1102,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 @@ -1334,8 +1328,8 @@ Composing rels: L -> ordernumber __PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber"); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-10-31 10:39:35 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Lc6GQ2E7d+tyzTk3v2sWjQ +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-12-12 16:31:58 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gDowcouH821/r88EUCdq9Q __PACKAGE__->belongs_to( "guarantor", diff --git a/Koha/Schema/Result/BorrowerModification.pm b/Koha/Schema/Result/BorrowerModification.pm index af4895a..bffba37 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-01-09 16:20:34 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:MlntmtWrUZQhQs5K9xCH8w # 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 937a4a4..d634d05 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' @@ -527,18 +501,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", @@ -604,8 +568,8 @@ __PACKAGE__->add_columns( ); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-09-13 17:32:29 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pcdyzQacTbFDJ9R1k0E8mA +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-12-12 16:31:58 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:aww4S4vMbSwAvHi2GJW7AA # You can replace this text with custom code or comments, and it will be preserved on regeneration -- 2.1.4