X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Debbugs%2FDB%2FResult%2FBugBlock.pm;h=0200a313657d0fe0c4996ddf8960039aa9c91f8a;hb=466f7faff129a5699c7674f59900a92aa256175d;hp=273eca037dbfdbd5fa08e8e3055296302673a237;hpb=35bce53278e15f926931264b88abf2e28b040d3b;p=debbugs.git diff --git a/Debbugs/DB/Result/BugBlock.pm b/Debbugs/DB/Result/BugBlock.pm index 273eca0..0200a31 100644 --- a/Debbugs/DB/Result/BugBlock.pm +++ b/Debbugs/DB/Result/BugBlock.pm @@ -21,11 +21,13 @@ use base 'DBIx::Class::Core'; =item * L +=item * L + =back =cut -__PACKAGE__->load_components("InflateColumn::DateTime"); +__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp"); =head1 TABLE: C @@ -116,7 +118,7 @@ __PACKAGE__->belongs_to( "block", "Debbugs::DB::Result::Bug", { id => "blocks" }, - { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" }, ); =head2 bug @@ -131,13 +133,20 @@ __PACKAGE__->belongs_to( "bug", "Debbugs::DB::Result::Bug", { id => "bug" }, - { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" }, ); -# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-03-27 18:54:20 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QswG/RKpqrXvpj74XiV0WQ +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-11-30 21:56:51 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Rkt0XlA4r2YFX0KnUZmS6A + +sub sqlt_deploy_hook { + my ($self, $sqlt_table) = @_; + for my $idx (qw(bug blocks)) { + $sqlt_table->add_index(name => 'bug_blocks_'.$idx.'_idx', + fields => [$idx]); + } +} -# You can replace this text with custom code or comments, and it will be preserved on regeneration 1;