jobs.sql 929 Bytes
Newer Older
1 2 3 4 5 6 7
CREATE TABLE jobs (
id text NOT NULL,
dbase_config text NOT NULL,
username text,
email text,
ip_address text NOT NULL,
submit_time timestamp NOT NULL,
8 9
start_time timestamp,
stop_time timestamp,
10 11
module text NOT NULL,
status text NOT NULL,
12
percent_complete int,
13
message_html text,
14 15 16 17 18
priority int NOT NULL,
PRIMARY KEY(id)
);

GRANT SELECT,UPDATE,INSERT,DELETE ON jobs TO apache,bigsdb;
19 20 21 22 23 24 25 26 27 28 29 30 31

CREATE TABLE params (
job_id text NOT NULL,
key text NOT NULL,
value text NOT NULL,
PRIMARY KEY (job_id,key),
CONSTRAINT p_job_id FOREIGN KEY (job_id) REFERENCES jobs
ON DELETE CASCADE
ON UPDATE CASCADE
);

GRANT SELECT,UPDATE,INSERT,DELETE ON params TO apache,bigsdb;

32 33 34 35 36 37 38 39 40 41 42
CREATE TABLE output (
job_id text NOT NULL,
filename text NOT NULL,
description text NOT NULL,
PRIMARY KEY (job_id),
CONSTRAINT o_job_id FOREIGN KEY (job_id) REFERENCES jobs
ON DELETE CASCADE
ON UPDATE CASCADE
);

GRANT SELECT,UPDATE,INSERT,DELETE ON output TO apache,bigsdb;