From 28ccac56ce9cc3ced4074ca65af64931fc85ef85 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 26 Aug 2014 11:55:40 -0300 Subject: [PATCH] 10402: DBIx::Class schema update Signed-off-by: Tomas Cohen Arazi --- Koha/Schema/Result/Aqbookseller.pm | 74 +++---------- Koha/Schema/Result/Aqcontact.pm | 169 +++++++++++++++++++++++++++++ 2 files changed, 186 insertions(+), 57 deletions(-) create mode 100644 Koha/Schema/Result/Aqcontact.pm diff --git a/Koha/Schema/Result/Aqbookseller.pm b/Koha/Schema/Result/Aqbookseller.pm index ee2f4bd122..8641a4b4ce 100644 --- a/Koha/Schema/Result/Aqbookseller.pm +++ b/Koha/Schema/Result/Aqbookseller.pm @@ -97,12 +97,6 @@ __PACKAGE__->table("aqbooksellers"); data_type: 'mediumtext' is_nullable: 1 -=head2 contact - - data_type: 'varchar' - is_nullable: 1 - size: 100 - =head2 postal data_type: 'mediumtext' @@ -114,41 +108,6 @@ __PACKAGE__->table("aqbooksellers"); is_nullable: 1 size: 255 -=head2 contpos - - data_type: 'varchar' - is_nullable: 1 - size: 100 - -=head2 contphone - - data_type: 'varchar' - is_nullable: 1 - size: 100 - -=head2 contfax - - data_type: 'varchar' - is_nullable: 1 - size: 100 - -=head2 contaltphone - - data_type: 'varchar' - is_nullable: 1 - size: 100 - -=head2 contemail - - data_type: 'varchar' - is_nullable: 1 - size: 100 - -=head2 contnotes - - data_type: 'mediumtext' - is_nullable: 1 - =head2 active data_type: 'tinyint' @@ -237,24 +196,10 @@ __PACKAGE__->add_columns( { data_type => "mediumtext", is_nullable => 1 }, "booksellerurl", { data_type => "mediumtext", is_nullable => 1 }, - "contact", - { data_type => "varchar", is_nullable => 1, size => 100 }, "postal", { data_type => "mediumtext", is_nullable => 1 }, "url", { data_type => "varchar", is_nullable => 1, size => 255 }, - "contpos", - { data_type => "varchar", is_nullable => 1, size => 100 }, - "contphone", - { data_type => "varchar", is_nullable => 1, size => 100 }, - "contfax", - { data_type => "varchar", is_nullable => 1, size => 100 }, - "contaltphone", - { data_type => "varchar", is_nullable => 1, size => 100 }, - "contemail", - { data_type => "varchar", is_nullable => 1, size => 100 }, - "contnotes", - { data_type => "mediumtext", is_nullable => 1 }, "active", { data_type => "tinyint", is_nullable => 1 }, "listprice", @@ -321,6 +266,21 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 aqcontacts + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "aqcontacts", + "Koha::Schema::Result::Aqcontact", + { "foreign.booksellerid" => "self.id" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 aqcontracts Type: has_many @@ -392,8 +352,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Pqq5chHLUwm5Ss5CCQBL2g +# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-08-26 11:53:50 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kz1tuPJihENyV6OyCwyX/A # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Aqcontact.pm b/Koha/Schema/Result/Aqcontact.pm new file mode 100644 index 0000000000..e7e518551a --- /dev/null +++ b/Koha/Schema/Result/Aqcontact.pm @@ -0,0 +1,169 @@ +use utf8; +package Koha::Schema::Result::Aqcontact; + +# Created by DBIx::Class::Schema::Loader +# DO NOT MODIFY THE FIRST PART OF THIS FILE + +=head1 NAME + +Koha::Schema::Result::Aqcontact + +=cut + +use strict; +use warnings; + +use base 'DBIx::Class::Core'; + +=head1 TABLE: C + +=cut + +__PACKAGE__->table("aqcontacts"); + +=head1 ACCESSORS + +=head2 id + + data_type: 'integer' + is_auto_increment: 1 + is_nullable: 0 + +=head2 name + + data_type: 'varchar' + is_nullable: 1 + size: 100 + +=head2 position + + data_type: 'varchar' + is_nullable: 1 + size: 100 + +=head2 phone + + data_type: 'varchar' + is_nullable: 1 + size: 100 + +=head2 altphone + + data_type: 'varchar' + is_nullable: 1 + size: 100 + +=head2 fax + + data_type: 'varchar' + is_nullable: 1 + size: 100 + +=head2 email + + data_type: 'varchar' + is_nullable: 1 + size: 100 + +=head2 notes + + data_type: 'mediumtext' + is_nullable: 1 + +=head2 claimacquisition + + data_type: 'tinyint' + default_value: 0 + is_nullable: 0 + +=head2 claimissues + + data_type: 'tinyint' + default_value: 0 + is_nullable: 0 + +=head2 acqprimary + + data_type: 'tinyint' + default_value: 0 + is_nullable: 0 + +=head2 serialsprimary + + data_type: 'tinyint' + default_value: 0 + is_nullable: 0 + +=head2 booksellerid + + data_type: 'integer' + is_foreign_key: 1 + is_nullable: 0 + +=cut + +__PACKAGE__->add_columns( + "id", + { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, + "name", + { data_type => "varchar", is_nullable => 1, size => 100 }, + "position", + { data_type => "varchar", is_nullable => 1, size => 100 }, + "phone", + { data_type => "varchar", is_nullable => 1, size => 100 }, + "altphone", + { data_type => "varchar", is_nullable => 1, size => 100 }, + "fax", + { data_type => "varchar", is_nullable => 1, size => 100 }, + "email", + { data_type => "varchar", is_nullable => 1, size => 100 }, + "notes", + { data_type => "mediumtext", is_nullable => 1 }, + "claimacquisition", + { data_type => "tinyint", default_value => 0, is_nullable => 0 }, + "claimissues", + { data_type => "tinyint", default_value => 0, is_nullable => 0 }, + "acqprimary", + { data_type => "tinyint", default_value => 0, is_nullable => 0 }, + "serialsprimary", + { data_type => "tinyint", default_value => 0, is_nullable => 0 }, + "booksellerid", + { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, +); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + +__PACKAGE__->set_primary_key("id"); + +=head1 RELATIONS + +=head2 booksellerid + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "booksellerid", + "Koha::Schema::Result::Aqbookseller", + { id => "booksellerid" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, +); + + +# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-08-26 11:53:50 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sIT7PzDxqInviUSe7wuzow + + +# You can replace this text with custom code or comments, and it will be preserved on regeneration +1; -- 2.39.5