0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 00:40:30 -05:00
penpot/backend/resources/migrations/XXXX.workers.up.sql
2016-11-20 20:04:52 +01:00

11 lines
424 B
SQL

CREATE TYPE task_status
AS ENUM ('pending', 'canceled', 'completed', 'failed');
CREATE TABLE task (
id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
created_at timestamptz NOT NULL DEFAULT clock_timestamp(),
completed_at timestamptz DEFAULT NULL,
queue text NOT NULL DEFAULT '',
status task_status NOT NULL DEFAULT 'pending',
error text NOT NULL DEFAULT ''
) WITH (OIDS=FALSE);