Gruntmaster::Data::Result::Open
+=head1 DESCRIPTION
+
+List of (contest, problem, user, time when user opened problem)
+
=cut
use strict;
"contest",
"Gruntmaster::Data::Result::Contest",
{ id => "contest" },
- { is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
+ { is_deferrable => 0, on_delete => "CASCADE", on_update => "NO ACTION" },
);
=head2 owner
"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
"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-24 09:25:07
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:MgoDt8QyQeSpjIJZEd5RXQ
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-12-19 16:44:22
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jAao0vjOW87mO37ZQhm4Cw
+
+use Class::Method::Modifiers qw/after/;
+
+sub rawcontest { shift->get_column('contest') }
+sub rawowner { shift->get_column('owner') }
+sub rawproblem { shift->get_column('problem') }
+after qw/insert update delete/ => sub {
+ my ($self) = @_;
+ Gruntmaster::Data::purge '/st/' . $self->rawcontest;
+};
-# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;
__END__