track start time for tasks

This commit is contained in:
Mike McLean 2010-03-24 17:38:42 -04:00
parent ee5423221f
commit e78783ff8f
5 changed files with 21 additions and 2 deletions

View file

@ -6,6 +6,8 @@ BEGIN;
-- First the simple stuff. A pair of new host fields.
ALTER TABLE host ADD COLUMN description TEXT;
ALTER TABLE host ADD COLUMN comment TEXT;
-- ...and a new field for tasks
ALTER TABLE task ADD COLUMN start_time TIMESTAMP;
-- The rest updates all the versioned tables to track who did what

View file

@ -217,6 +217,7 @@ CREATE TABLE task (
id SERIAL NOT NULL PRIMARY KEY,
state INTEGER,
create_time TIMESTAMP NOT NULL DEFAULT NOW(),
start_time TIMESTAMP,
completion_time TIMESTAMP,
channel_id INTEGER NOT NULL REFERENCES channels(id),
host_id INTEGER REFERENCES host (id),