]> git.donarmstrong.com Git - debbugs.git/blobdiff - Debbugs/DB/Result/BugBinpackage.pm
update result classes for new relationships
[debbugs.git] / Debbugs / DB / Result / BugBinpackage.pm
index f63025a1cfd8f4ecb67702c5189f8e4ef67270cc..102feebb8b81c84ecd80194a10c27b6fdd663427 100644 (file)
@@ -35,7 +35,14 @@ __PACKAGE__->table("bug_binpackage");
 
 =head1 ACCESSORS
 
-=head2 bug_id
+=head2 id
+
+  data_type: 'integer'
+  is_auto_increment: 1
+  is_nullable: 0
+  sequence: 'bug_binpackage_id_seq'
+
+=head2 bug
 
   data_type: 'integer'
   is_foreign_key: 1
@@ -43,7 +50,7 @@ __PACKAGE__->table("bug_binpackage");
 
 Bug id (matches bug)
 
-=head2 bin_pkg_id
+=head2 bin_pkg
 
   data_type: 'integer'
   is_foreign_key: 1
@@ -54,27 +61,46 @@ Binary package id (matches bin_pkg)
 =cut
 
 __PACKAGE__->add_columns(
-  "bug_id",
+  "id",
+  {
+    data_type         => "integer",
+    is_auto_increment => 1,
+    is_nullable       => 0,
+    sequence          => "bug_binpackage_id_seq",
+  },
+  "bug",
   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
-  "bin_pkg_id",
+  "bin_pkg",
   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
 );
 
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</id>
+
+=back
+
+=cut
+
+__PACKAGE__->set_primary_key("id");
+
 =head1 UNIQUE CONSTRAINTS
 
 =head2 C<bug_binpackage_id_pkg_id>
 
 =over 4
 
-=item * L</bug_id>
+=item * L</bug>
 
-=item * L</bin_pkg_id>
+=item * L</bin_pkg>
 
 =back
 
 =cut
 
-__PACKAGE__->add_unique_constraint("bug_binpackage_id_pkg_id", ["bug_id", "bin_pkg_id"]);
+__PACKAGE__->add_unique_constraint("bug_binpackage_id_pkg_id", ["bug", "bin_pkg"]);
 
 =head1 RELATIONS
 
@@ -89,7 +115,7 @@ Related object: L<Debbugs::DB::Result::BinPkg>
 __PACKAGE__->belongs_to(
   "bin_pkg",
   "Debbugs::DB::Result::BinPkg",
-  { id => "bin_pkg_id" },
+  { id => "bin_pkg" },
   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
 );
 
@@ -104,13 +130,13 @@ Related object: L<Debbugs::DB::Result::Bug>
 __PACKAGE__->belongs_to(
   "bug",
   "Debbugs::DB::Result::Bug",
-  { id => "bug_id" },
+  { id => "bug" },
   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
 );
 
 
-# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-01-22 21:35:43
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2QtRdBjEVaUYmfqY7rWA6g
+# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-03-27 18:54:20
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cQ0MmOnrqlxvxubcvh4PBg
 
 
 # You can replace this text with custom code or comments, and it will be preserved on regeneration