diff options
author | franck cuny <franck@lumberjaph.net> | 2010-10-03 11:36:54 +0200 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2010-10-03 11:36:54 +0200 |
commit | 96c2d313ad30d649050116ef3f8878db45baa14a (patch) | |
tree | 59e0d627e39f787d0710063eab66943126abf9a3 /lib/jitterbug/Schema/Result/Task.pm | |
parent | update makefile (diff) | |
download | jitterbug-96c2d313ad30d649050116ef3f8878db45baa14a.tar.gz |
remove redis, use dbic instead
Diffstat (limited to 'lib/jitterbug/Schema/Result/Task.pm')
-rw-r--r-- | lib/jitterbug/Schema/Result/Task.pm | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/jitterbug/Schema/Result/Task.pm b/lib/jitterbug/Schema/Result/Task.pm new file mode 100644 index 0000000..e63e101 --- /dev/null +++ b/lib/jitterbug/Schema/Result/Task.pm @@ -0,0 +1,29 @@ +package jitterbug::Schema::Result::Task; +use base qw/DBIx::Class::Core/; + +__PACKAGE__->table('task'); +__PACKAGE__->add_columns( + taskid => { + data_type => 'int', + is_auto_increment => 1, + }, + sha256 => { data_type => 'text', is_foreign_key => 1 }, + projectid => { + data_type => 'int', + is_foreign_key => 1, + }, +); + +__PACKAGE__->set_primary_key('taskid'); +__PACKAGE__->add_unique_constraint( [qw/projectid/] ); +__PACKAGE__->add_unique_constraint( [qw/sha256/] ); +__PACKAGE__->belongs_to( + project => 'jitterbug::Schema::Result::Project', + 'projectid' +); +__PACKAGE__->belongs_to( + commit => 'jitterbug::Schema::Result::Commit', + 'sha256' +); + +1; |