From 96c2d313ad30d649050116ef3f8878db45baa14a Mon Sep 17 00:00:00 2001 From: franck cuny Date: Sun, 3 Oct 2010 11:36:54 +0200 Subject: remove redis, use dbic instead --- lib/jitterbug/Schema/Result/Project.pm | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 lib/jitterbug/Schema/Result/Project.pm (limited to 'lib/jitterbug/Schema/Result/Project.pm') diff --git a/lib/jitterbug/Schema/Result/Project.pm b/lib/jitterbug/Schema/Result/Project.pm new file mode 100644 index 0000000..245b54c --- /dev/null +++ b/lib/jitterbug/Schema/Result/Project.pm @@ -0,0 +1,26 @@ +package jitterbug::Schema::Result::Project; +use base qw/DBIx::Class::Core/; + +__PACKAGE__->table('project'); +__PACKAGE__->add_columns( + projectid => { + data_type => 'int', + is_auto_increment => 1, + }, + name => { data_type => 'text', }, + url => { data_type => 'text', }, + description => { data_type => 'text', }, + owner => { data_type => 'text', } +); +__PACKAGE__->set_primary_key('projectid'); +__PACKAGE__->add_unique_constraint( [qw/name/] ); +__PACKAGE__->has_many( + commits => 'jitterbug::Schema::Result::Commit', + 'sha256', +); +__PACKAGE__->has_many( + tasks => 'jitterbug::Schema::Result::Task', + 'taskid', +); + +1; -- cgit 1.4.1