about summary refs log tree commit diff
path: root/lib/jitterbug/Schema/Result/Task.pm
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2011-02-13 13:57:13 +0100
committerfranck cuny <franck@lumberjaph.net>2011-02-13 13:57:13 +0100
commitafca829e55239b89a195c1035e8e5b40ca86e011 (patch)
tree09be96d244fadc5faa12fc6c6fdb606f5dc484fa /lib/jitterbug/Schema/Result/Task.pm
parentprepare to update schema again (diff)
downloadjitterbug-afca829e55239b89a195c1035e8e5b40ca86e011.tar.gz
column started_when: datetime when the build started
Diffstat (limited to 'lib/jitterbug/Schema/Result/Task.pm')
-rw-r--r--lib/jitterbug/Schema/Result/Task.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/jitterbug/Schema/Result/Task.pm b/lib/jitterbug/Schema/Result/Task.pm
index 331deb4..2eaed62 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',
@@ -13,8 +14,13 @@ __PACKAGE__->add_columns(
         is_foreign_key => 1,
     },
     running => {
-        data_type => 'bool',
-        default_value   => 0,
+        data_type     => 'bool',
+        default_value => 0,
+    },
+    started_when => {
+        data_type                 => 'datetime',
+        is_nullable               => 1,
+        datetime_undef_if_invalid => 1
     },
 );