Skip to content

Instantly share code, notes, and snippets.

@dxlbnl
Created September 1, 2017 14:42
Show Gist options
  • Save dxlbnl/60384cab0949c09d5d412b29727f9583 to your computer and use it in GitHub Desktop.
Save dxlbnl/60384cab0949c09d5d412b29727f9583 to your computer and use it in GitHub Desktop.
queue=> \dt
List of relations
Schema | Name | Type | Owner
--------+----------------------------+-------+-----------
public | __diesel_schema_migrations | table | nerdalize
public | runs | table | nerdalize
public | tasks | table | nerdalize
public | workloads | table | nerdalize
(4 rows)
queue=> \d runs
Table "public.runs"
Column | Type | Modifiers
------------+-----------------------------+---------------------------------------------------
id | integer | not null default nextval('runs_id_seq'::regclass)
created_at | timestamp without time zone | default now()
task | integer |
status | run_status | default 'CREATED'::run_status
stdin | text |
stdout | text |
stderr | text |
result | integer |
output | character(30) |
ttl | timestamp without time zone |
Indexes:
"runs_pkey" PRIMARY KEY, btree (id)
Foreign-key constraints:
"runs_task_fkey" FOREIGN KEY (task) REFERENCES tasks(id)
queue=> \d workloads
Table "public.workloads"
Column | Type | Modifiers
------------+-----------------------------+--------------------------------------------------------
id | integer | not null default nextval('workloads_id_seq'::regclass)
created_at | timestamp without time zone | default now()
project | character(50) |
image | character(100) |
Indexes:
"workloads_pkey" PRIMARY KEY, btree (id)
Referenced by:
TABLE "tasks" CONSTRAINT "tasks_workload_fkey" FOREIGN KEY (workload) REFERENCES workloads(id)
queue=> \d tasks
Table "public.tasks"
Column | Type | Modifiers
------------+-----------------------------+----------------------------------------------------
id | integer | not null default nextval('tasks_id_seq'::regclass)
created_at | timestamp without time zone | default now()
workload | integer |
cmd | character(200) |
env | jsonb |
Indexes:
"tasks_pkey" PRIMARY KEY, btree (id)
Foreign-key constraints:
"tasks_workload_fkey" FOREIGN KEY (workload) REFERENCES workloads(id)
Referenced by:
TABLE "runs" CONSTRAINT "runs_task_fkey" FOREIGN KEY (task) REFERENCES tasks(id)
queue=>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment