]> git.donarmstrong.com Git - debbugs.git/blobdiff - Debbugs/DB/Result/BugMessage.pm
switch to compatibility level 12
[debbugs.git] / Debbugs / DB / Result / BugMessage.pm
index 365d27556939c491741455d983254b6b8b7b05cd..b5fccc558984ef1c1f641dbbfdadaa0bccee1e8e 100644 (file)
@@ -21,11 +21,13 @@ use base 'DBIx::Class::Core';
 
 =item * L<DBIx::Class::InflateColumn::DateTime>
 
+=item * L<DBIx::Class::TimeStamp>
+
 =back
 
 =cut
 
-__PACKAGE__->load_components("InflateColumn::DateTime");
+__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
 
 =head1 TABLE: C<bug_message>
 
@@ -35,13 +37,6 @@ __PACKAGE__->table("bug_message");
 
 =head1 ACCESSORS
 
-=head2 id
-
-  data_type: 'integer'
-  is_auto_increment: 1
-  is_nullable: 0
-  sequence: 'bug_message_id_seq'
-
 =head2 bug
 
   data_type: 'integer'
@@ -82,13 +77,6 @@ Time offset was valid
 =cut
 
 __PACKAGE__->add_columns(
-  "id",
-  {
-    data_type         => "integer",
-    is_auto_increment => 1,
-    is_nullable       => 0,
-    sequence          => "bug_message_id_seq",
-  },
   "bug",
   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
   "message",
@@ -101,17 +89,21 @@ __PACKAGE__->add_columns(
   { data_type => "timestamp with time zone", is_nullable => 1 },
 );
 
-=head1 PRIMARY KEY
+=head1 UNIQUE CONSTRAINTS
+
+=head2 C<bug_message_bug_message_idx>
 
 =over 4
 
-=item * L</id>
+=item * L</bug>
+
+=item * L</message>
 
 =back
 
 =cut
 
-__PACKAGE__->set_primary_key("id");
+__PACKAGE__->add_unique_constraint("bug_message_bug_message_idx", ["bug", "message"]);
 
 =head1 RELATIONS
 
@@ -127,7 +119,7 @@ __PACKAGE__->belongs_to(
   "bug",
   "Debbugs::DB::Result::Bug",
   { id => "bug" },
-  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
+  { is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" },
 );
 
 =head2 message
@@ -142,13 +134,17 @@ __PACKAGE__->belongs_to(
   "message",
   "Debbugs::DB::Result::Message",
   { id => "message" },
-  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
+  { is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" },
 );
 
 
-# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-03-27 18:54:20
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3UCOADGWEq7+IA7L23sa5A
-
+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2017-03-04 10:59:03
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BRbN9C6P/wvWWmSmjNGjLA
 
-# You can replace this text with custom code or comments, and it will be preserved on regeneration
+sub sqlt_deploy_hook {
+    my ($self, $sqlt_table) = @_;
+    $sqlt_table->add_index(name => 'bug_message_idx_bug_message_number',
+                          fields => [qw(bug message_number)],
+                         );
+}
 1;