X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FData%2FResult%2FJob.pm;h=0bb76b9355cf76efb40536311c5fe0d82bf167de;hb=9bb399215eed61555c05f025aedf6dc53f4e977d;hp=1b283a3ed613c9a963ca4e8b4f01050e825940d2;hpb=85d3f015cc4e11f00adba9d3a99cb69c7f77156b;p=gruntmaster-data.git diff --git a/lib/Gruntmaster/Data/Result/Job.pm b/lib/Gruntmaster/Data/Result/Job.pm index 1b283a3..0bb76b9 100644 --- a/lib/Gruntmaster/Data/Result/Job.pm +++ b/lib/Gruntmaster/Data/Result/Job.pm @@ -166,7 +166,7 @@ __PACKAGE__->belongs_to( { is_deferrable => 0, join_type => "LEFT", - on_delete => "NO ACTION", + on_delete => "CASCADE", on_update => "NO ACTION", }, ); @@ -183,7 +183,7 @@ __PACKAGE__->belongs_to( "owner", "Gruntmaster::Data::Result::User", { id => "owner" }, - { is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" }, + { is_deferrable => 0, on_delete => "CASCADE", on_update => "NO ACTION" }, ); =head2 problem @@ -198,13 +198,38 @@ __PACKAGE__->belongs_to( "problem", "Gruntmaster::Data::Result::Problem", { id => "problem" }, - { is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" }, + { is_deferrable => 0, on_delete => "CASCADE", on_update => "NO ACTION" }, ); -# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-03-26 15:24:46 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dnYOXMU6Or/Wh0m5A1N5UA +# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-05-16 15:03:32 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:k3Oq7pNqFoCI5NwY5GaWfQ +sub rerun { + shift->update({daemon => undef, result => -2, result_text => undef}); +} -# You can replace this text with custom code or comments, and it will be preserved on regeneration 1; + +__END__ + +=head1 METHODS + +=head2 rerun + +Reruns this job. + +=head1 AUTHOR + +Marius Gavrilescu Emarius@ieval.roE + +=head1 COPYRIGHT AND LICENSE + +Copyright (C) 2014 by Marius Gavrilescu + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself, either Perl version 5.18.1 or, +at your option, any later version of Perl 5 you may have available. + + +=cut