about summary refs log tree commit diff
path: root/lib/jitterbug/Schema
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2011-02-13 16:20:59 +0100
committerfranck cuny <franck@lumberjaph.net>2011-02-13 16:20:59 +0100
commite81938b20ae19d472a6f835f8af01a428b8724de (patch)
treed6cea5e811f60fcd8f3c94ee1d9b4cf247404531 /lib/jitterbug/Schema
parentMake jitterbug::Test use the current perl interp (diff)
parentMerge branch 'feature/stack_builds' into devel (diff)
downloadjitterbug-e81938b20ae19d472a6f835f8af01a428b8724de.tar.gz
Merge branch 'devel'
* devel:
  add more tests
  inside the hook, we check if we can add more than one task for this project
  add configuration option to skip some branches; add tests for the Hook
  that's why we want datetime
  use DateTime
  update templates to show informations about running tasks
  column started_when: datetime when the build started
  prepare to update schema again
  display current build if any
  add sql schema for various version
  don't ignore .sql files
  script to migrate/upgrade dbix schema
  add version to our schema
  update templates and css
  we want a find, not a search here
  add pending status to the schema (TODO: need a script to migrate the schema)
  load tasks and display them on the dashboard
Diffstat (limited to 'lib/jitterbug/Schema')
-rw-r--r--lib/jitterbug/Schema/Result/Task.pm11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/jitterbug/Schema/Result/Task.pm b/lib/jitterbug/Schema/Result/Task.pm
index e63e101..ad880d8 100644
--- a/lib/jitterbug/Schema/Result/Task.pm
+++ b/lib/jitterbug/Schema/Result/Task.pm
@@ -2,6 +2,7 @@ package jitterbug::Schema::Result::Task;
 use base qw/DBIx::Class::Core/;
 
 __PACKAGE__->table('task');
+__PACKAGE__->load_components(qw/InflateColumn::DateTime/);
 __PACKAGE__->add_columns(
     taskid => {
         data_type         => 'int',
@@ -12,10 +13,18 @@ __PACKAGE__->add_columns(
         data_type      => 'int',
         is_foreign_key => 1,
     },
+    running => {
+        data_type     => 'bool',
+        default_value => 0,
+    },
+    started_when => {
+        data_type                 => 'datetime',
+        is_nullable               => 1,
+        datetime_undef_if_invalid => 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',