]> git.donarmstrong.com Git - debbugs.git/blobdiff - Debbugs/DB/Result/SrcPkg.pm
allow for duplicate, disabled src packages
[debbugs.git] / Debbugs / DB / Result / SrcPkg.pm
index 66d626818591b8ba077d046e17c1acf2ecbc0ef1..cf45e3b75defd278965d075633db2d460067ae1f 100644 (file)
@@ -6,7 +6,7 @@ package Debbugs::DB::Result::SrcPkg;
 
 =head1 NAME
 
-Debbugs::DB::Result::SrcPkg
+Debbugs::DB::Result::SrcPkg - Source packages
 
 =cut
 
@@ -42,11 +42,15 @@ __PACKAGE__->table("src_pkg");
   is_nullable: 0
   sequence: 'src_pkg_id_seq'
 
+Source package id
+
 =head2 pkg
 
   data_type: 'text'
   is_nullable: 0
 
+Source package name
+
 =head2 pseduopkg
 
   data_type: 'boolean'
@@ -59,6 +63,33 @@ __PACKAGE__->table("src_pkg");
   is_foreign_key: 1
   is_nullable: 1
 
+Source package id which this source package is an alias of
+
+=head2 creation
+
+  data_type: 'timestamp with time zone'
+  default_value: current_timestamp
+  is_nullable: 1
+  original: {default_value => \"now()"}
+
+=head2 disabled
+
+  data_type: 'timestamp with time zone'
+  is_nullable: 1
+
+=head2 last_modified
+
+  data_type: 'timestamp with time zone'
+  default_value: current_timestamp
+  is_nullable: 1
+  original: {default_value => \"now()"}
+
+=head2 obsolete
+
+  data_type: 'boolean'
+  default_value: false
+  is_nullable: 1
+
 =cut
 
 __PACKAGE__->add_columns(
@@ -75,6 +106,24 @@ __PACKAGE__->add_columns(
   { data_type => "boolean", default_value => \"false", is_nullable => 1 },
   "alias_of",
   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
+  "creation",
+  {
+    data_type     => "timestamp with time zone",
+    default_value => \"current_timestamp",
+    is_nullable   => 1,
+    original      => { default_value => \"now()" },
+  },
+  "disabled",
+  { data_type => "timestamp with time zone", is_nullable => 1 },
+  "last_modified",
+  {
+    data_type     => "timestamp with time zone",
+    default_value => \"current_timestamp",
+    is_nullable   => 1,
+    original      => { default_value => \"now()" },
+  },
+  "obsolete",
+  { data_type => "boolean", default_value => \"false", is_nullable => 1 },
 );
 
 =head1 PRIMARY KEY
@@ -91,17 +140,35 @@ __PACKAGE__->set_primary_key("id");
 
 =head1 UNIQUE CONSTRAINTS
 
-=head2 C<src_pkg_pkg_key>
+=head2 C<src_pkg_pkg_alias>
 
 =over 4
 
 =item * L</pkg>
 
+=item * L</alias_of>
+
+=item * L</obsolete>
+
+=back
+
+=cut
+
+__PACKAGE__->add_unique_constraint("src_pkg_pkg_alias", ["pkg", "alias_of", "obsolete"]);
+
+=head2 C<src_pkg_pkg_disabled>
+
+=over 4
+
+=item * L</pkg>
+
+=item * L</disabled>
+
 =back
 
 =cut
 
-__PACKAGE__->add_unique_constraint("src_pkg_pkg_key", ["pkg"]);
+__PACKAGE__->add_unique_constraint("src_pkg_pkg_disabled", ["pkg", "disabled"]);
 
 =head1 RELATIONS
 
@@ -118,7 +185,7 @@ __PACKAGE__->belongs_to(
   "Debbugs::DB::Result::SrcPkg",
   { id => "alias_of" },
   {
-    is_deferrable => 1,
+    is_deferrable => 0,
     join_type     => "LEFT",
     on_delete     => "CASCADE",
     on_update     => "CASCADE",
@@ -136,7 +203,7 @@ Related object: L<Debbugs::DB::Result::BugSrcpackage>
 __PACKAGE__->has_many(
   "bug_srcpackages",
   "Debbugs::DB::Result::BugSrcpackage",
-  { "foreign.src_pkg_id" => "self.id" },
+  { "foreign.src_pkg" => "self.id" },
   { cascade_copy => 0, cascade_delete => 0 },
 );
 
@@ -151,7 +218,7 @@ Related object: L<Debbugs::DB::Result::BugVer>
 __PACKAGE__->has_many(
   "bug_vers",
   "Debbugs::DB::Result::BugVer",
-  { "foreign.src_pkg_id" => "self.id" },
+  { "foreign.src_pkg" => "self.id" },
   { cascade_copy => 0, cascade_delete => 0 },
 );
 
@@ -181,13 +248,13 @@ Related object: L<Debbugs::DB::Result::SrcVer>
 __PACKAGE__->has_many(
   "src_vers",
   "Debbugs::DB::Result::SrcVer",
-  { "foreign.src_pkg_id" => "self.id" },
+  { "foreign.src_pkg" => "self.id" },
   { cascade_copy => 0, cascade_delete => 0 },
 );
 
 
-# Created by DBIx::Class::Schema::Loader v0.07025 @ 2012-11-23 17:41:43
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:s3tqzD1crqO0a57NzVkWDg
+# Created by DBIx::Class::Schema::Loader v0.07036 @ 2013-11-13 09:14:52
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3Jq0yBnJv5OW6jfXwUPUBg
 
 
 # You can replace this text with custom code or comments, and it will be preserved on regeneration