diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2013-06-09 23:22:39 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2013-06-09 23:22:39 +0200 |
commit | 1c0fc92c719f3856653d0efcc5fe4a1fa30b7bac (patch) | |
tree | ab1ebbfbd21fe1fcc5be75d31c5262f65a931641 /src/main/resources | |
parent | 33e3be55dc2d815cbd0208bf59d12a7e727f3105 (diff) | |
download | quartz-based-queue-1c0fc92c719f3856653d0efcc5fe4a1fa30b7bac.tar.gz quartz-based-queue-1c0fc92c719f3856653d0efcc5fe4a1fa30b7bac.tar.bz2 quartz-based-queue-1c0fc92c719f3856653d0efcc5fe4a1fa30b7bac.tar.xz quartz-based-queue-1c0fc92c719f3856653d0efcc5fe4a1fa30b7bac.zip |
wip
Diffstat (limited to 'src/main/resources')
-rw-r--r-- | src/main/resources/create-postgresql.sql | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/resources/create-postgresql.sql b/src/main/resources/create-postgresql.sql index 4773a0c..7c331fd 100644 --- a/src/main/resources/create-postgresql.sql +++ b/src/main/resources/create-postgresql.sql @@ -14,7 +14,7 @@ CREATE TABLE task ( id BIGINT NOT NULL, parent BIGINT, queue VARCHAR(100) NOT NULL, - state VARCHAR(100) NOT NULL, + state CHAR(10) NOT NULL, scheduled TIMESTAMP NOT NULL, last_run TIMESTAMP, run_count INT NOT NULL, @@ -25,6 +25,8 @@ CREATE TABLE task ( CONSTRAINT fk_task__parent FOREIGN KEY (parent) REFERENCES task (id) ); +CREATE INDEX ix_task__queue__state ON task (queue, state); + CREATE SEQUENCE task_seq; COMMIT; |