diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2013-05-26 10:42:01 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2013-05-26 10:42:01 +0200 |
commit | b65d39ab617d19ac48f44bc41f04a18803ca75e6 (patch) | |
tree | c93ed68851b56f64a33508108cdb432bf507fa11 /src/main/resources | |
parent | 74a3da1853eeb2e853d17d8d8527404248b209d3 (diff) | |
download | quartz-based-queue-b65d39ab617d19ac48f44bc41f04a18803ca75e6.tar.gz quartz-based-queue-b65d39ab617d19ac48f44bc41f04a18803ca75e6.tar.bz2 quartz-based-queue-b65d39ab617d19ac48f44bc41f04a18803ca75e6.tar.xz quartz-based-queue-b65d39ab617d19ac48f44bc41f04a18803ca75e6.zip |
o Adding a 'parent' reference so tasks can be put in a tree.
Diffstat (limited to 'src/main/resources')
-rw-r--r-- | src/main/resources/create.sql | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/resources/create.sql b/src/main/resources/create.sql index ed8913f..f7f2939 100644 --- a/src/main/resources/create.sql +++ b/src/main/resources/create.sql @@ -11,7 +11,8 @@ CREATE TABLE queue ( ); CREATE TABLE task ( - id INTEGER NOT NULL, + id BIGINT NOT NULL, + parent BIGINT NOT NULL, queue VARCHAR(100) NOT NULL, scheduled TIMESTAMP NOT NULL, last_run TIMESTAMP, @@ -19,7 +20,8 @@ CREATE TABLE task ( completed TIMESTAMP, arguments VARCHAR(100), CONSTRAINT pk_task PRIMARY KEY (id), - CONSTRAINT fk_task__queue FOREIGN KEY (queue) REFERENCES queue (name) + CONSTRAINT fk_task__queue FOREIGN KEY (queue) REFERENCES queue (name), + CONSTRAINT fk_task__parent FOREIGN KEY (parent) REFERENCES task (id) ); CREATE SEQUENCE task_id; |