-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sql
More file actions
23 lines (20 loc) · 1.11 KB
/
setup.sql
File metadata and controls
23 lines (20 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
CREATE TYPE job_status AS ENUM ('ENQUEUED', 'RUNNING', 'FINISHED', 'CANCELLED');
CREATE TABLE jobs
(
id uuid default gen_random_uuid() not null
primary key,
name text not null,
description text not null,
docker_image text not null,
docker_command text not null,
docker_environment jsonb not null,
created_at timestamp with time zone default CURRENT_TIMESTAMP not null,
updated_at timestamp with time zone default CURRENT_TIMESTAMP not null,
status job_status default 'ENQUEUED'::job_status not null,
metadata json
);
CREATE INDEX jobs_status_index ON jobs (status);
CREATE INDEX jobs_createdat_index ON jobs (created_at);
ALTER TABLE jobs
OWNER TO skeduler;
ALTER TYPE job_status OWNER TO skeduler;