From 82c4fd42ce22a421324a17a4908011d68189c1c4 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 9 Mar 2016 15:15:33 +0000 Subject: [PATCH] Bug 15084 - Update schema files Signed-off-by: Kyle M Hall --- Koha/Schema/Result/Aqbookseller.pm | 8 ++++---- Koha/Schema/Result/Aqorder.pm | 29 +++++++++++++++++++++++++---- Koha/Schema/Result/Currency.pm | 27 +++++++++++++++++++++++++-- Koha/Schema/Result/Suggestion.pm | 8 ++++---- 4 files changed, 58 insertions(+), 14 deletions(-) diff --git a/Koha/Schema/Result/Aqbookseller.pm b/Koha/Schema/Result/Aqbookseller.pm index 8641a4b4ce..86024568ef 100644 --- a/Koha/Schema/Result/Aqbookseller.pm +++ b/Koha/Schema/Result/Aqbookseller.pm @@ -75,7 +75,7 @@ __PACKAGE__->table("aqbooksellers"); data_type: 'varchar' default_value: (empty string) is_nullable: 0 - size: 3 + size: 10 =head2 booksellerfax @@ -187,7 +187,7 @@ __PACKAGE__->add_columns( "othersupplier", { data_type => "mediumtext", is_nullable => 1 }, "currency", - { data_type => "varchar", default_value => "", is_nullable => 0, size => 3 }, + { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 }, "booksellerfax", { data_type => "mediumtext", is_nullable => 1 }, "notes", @@ -352,8 +352,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-08-26 11:53:50 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kz1tuPJihENyV6OyCwyX/A +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-03-09 15:14:35 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JPswQh/s5S4nZnUzMckLnw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Aqorder.pm b/Koha/Schema/Result/Aqorder.pm index f511aebe45..e7d6fd3b07 100644 --- a/Koha/Schema/Result/Aqorder.pm +++ b/Koha/Schema/Result/Aqorder.pm @@ -49,8 +49,9 @@ __PACKAGE__->table("aqorders"); =head2 currency data_type: 'varchar' + is_foreign_key: 1 is_nullable: 1 - size: 3 + size: 10 =head2 listprice @@ -239,7 +240,7 @@ __PACKAGE__->add_columns( "quantity", { data_type => "smallint", is_nullable => 1 }, "currency", - { data_type => "varchar", is_nullable => 1, size => 3 }, + { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, "listprice", { data_type => "decimal", is_nullable => 1, size => [28, 6] }, "datereceived", @@ -441,6 +442,26 @@ __PACKAGE__->belongs_to( { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); +=head2 currency + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "currency", + "Koha::Schema::Result::Currency", + { currency => "currency" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "SET NULL", + on_update => "SET NULL", + }, +); + =head2 invoiceid Type: belongs_to @@ -492,8 +513,8 @@ Composing rels: L -> borrowernumber __PACKAGE__->many_to_many("borrowernumbers", "aqorder_users", "borrowernumber"); -# Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-05-14 11:27:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BCa/SxerJ+zEh8Pg9Jdkaw +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-03-09 15:14:35 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:somjoqKl7W2FYfhmgw4LQQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Currency.pm b/Koha/Schema/Result/Currency.pm index a8b5e5e9e1..7169666dc2 100644 --- a/Koha/Schema/Result/Currency.pm +++ b/Koha/Schema/Result/Currency.pm @@ -60,6 +60,12 @@ __PACKAGE__->table("currency"); data_type: 'tinyint' is_nullable: 1 +=head2 archived + + data_type: 'tinyint' + default_value: 0 + is_nullable: 1 + =cut __PACKAGE__->add_columns( @@ -80,6 +86,8 @@ __PACKAGE__->add_columns( { data_type => "float", is_nullable => 1, size => [15, 5] }, "active", { data_type => "tinyint", is_nullable => 1 }, + "archived", + { data_type => "tinyint", default_value => 0, is_nullable => 1 }, ); =head1 PRIMARY KEY @@ -126,9 +134,24 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 aqorders + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "aqorders", + "Koha::Schema::Result::Aqorder", + { "foreign.currency" => "self.currency" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-03-04 19:32:39 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:o9IAcoQ0uxMdl0zZ0M0agw +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-03-09 15:14:35 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0xP1adf+TPUi2cBn8Qah5A # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Suggestion.pm b/Koha/Schema/Result/Suggestion.pm index 43149132c4..22bdbb56a1 100644 --- a/Koha/Schema/Result/Suggestion.pm +++ b/Koha/Schema/Result/Suggestion.pm @@ -188,7 +188,7 @@ __PACKAGE__->table("suggestions"); data_type: 'varchar' is_nullable: 1 - size: 3 + size: 10 =head2 price @@ -273,7 +273,7 @@ __PACKAGE__->add_columns( "quantity", { data_type => "smallint", is_nullable => 1 }, "currency", - { data_type => "varchar", is_nullable => 1, size => 3 }, + { data_type => "varchar", is_nullable => 1, size => 10 }, "price", { data_type => "decimal", is_nullable => 1, size => [28, 6] }, "total", @@ -315,8 +315,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-04-13 11:06:30 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zXNCczGjuuyoojx85UcQig +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-03-09 15:14:35 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FlZsyhm/ugCqtMJ+HoYOkw # You can replace this text with custom content, and it will be preserved on regeneration -- 2.39.5