summary refs log tree commit diff
path: root/lib/jitterbug/Schema/Result/Commit.pm
blob: 02387e1421628aa077306682272c4b259a7dccb9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package jitterbug::Schema::Result::Commit;
use base qw/DBIx::Class::Core/;

__PACKAGE__->load_components(qw/InflateColumn::DateTime/);

__PACKAGE__->table('commit_push');
__PACKAGE__->add_columns(
    sha256 => {
        data_type         => 'text',
        is_auto_increment => 0,
    },
    content   => { data_type => 'text', },
    projectid => {
        data_type      => 'int',
        is_foreign_key => 1,
    },
    timestamp => { data_type => 'datetime' },
);
__PACKAGE__->set_primary_key('sha256');
__PACKAGE__->belongs_to(
    project => 'jitterbug::Schema::Result::Project',
    'projectid'
);
__PACKAGE__->has_many(
    tasks => 'jitterbug::Schema::Result::Task',
    'taskid',
);

1;