Removed execution flag from non-exe files
[Fumo.git] / lib / Fumo / Schema / Revision.pm
blobdcf416a235e7a494c9436abd412dd77ad0dc2ab2
1 package Fumo::Schema::Revision;
3 use strict;
4 use warnings;
6 use base 'DBIx::Class';
8 __PACKAGE__->load_components("Core");
9 __PACKAGE__->table("revision");
10 __PACKAGE__->add_columns(
11 "name",
12 { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 128 },
13 "project",
14 { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 128 },
15 "branch",
16 { data_type => "VARCHAR", default_value => "", is_nullable => 0, size => 128 },
17 "created",
18 { data_type => "DATETIME", default_value => "", is_nullable => 0, size => 19 },
19 "pass_rate",
20 { data_type => "INT", default_value => 0, is_nullable => 0, size => 3 },
22 __PACKAGE__->set_primary_key("name", "project", "branch");
23 __PACKAGE__->has_many(
24 "files",
25 "Fumo::Schema::File",
26 { "foreign.revision" => "self.name" },
28 __PACKAGE__->belongs_to("branch", "Fumo::Schema::Branch", { name => "branch" });
29 __PACKAGE__->belongs_to("project", "Fumo::Schema::Project", { name => "project" });
30 __PACKAGE__->has_many(
31 "tests",
32 "Fumo::Schema::Test",
33 { "foreign.revision" => "self.name" },
37 # Created by DBIx::Class::Schema::Loader v0.04001 @ 2007-07-20 22:25:16
38 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:G56rSJtt6DLqc9xNTIoQGA
40 use DateTime;
42 sub insert {
43 my $self = shift;
44 $self->created(DateTime->now);
46 return $self->next::method(@_);