Bug 15084 - Update schema files
authorKyle M Hall <kyle@bywatersolutions.com>
Wed, 9 Mar 2016 15:15:33 +0000 (15:15 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Wed, 9 Mar 2016 15:15:33 +0000 (15:15 +0000)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Koha/Schema/Result/Aqbookseller.pm
Koha/Schema/Result/Aqorder.pm
Koha/Schema/Result/Currency.pm
Koha/Schema/Result/Suggestion.pm

index 8641a4b..8602456 100644 (file)
@@ -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
index f511aeb..e7d6fd3 100644 (file)
@@ -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<Koha::Schema::Result::Currency>
+
+=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</aqorder_users> -> 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
index a8b5e5e..7169666 100644 (file)
@@ -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<Koha::Schema::Result::Aqorder>
+
+=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
index 4314913..22bdbb5 100644 (file)
@@ -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