Public source validation / validate (push) Failing after 3m8s
10 lines
421 B
SQL
10 lines
421 B
SQL
CREATE TABLE incident_notes (
|
|
id uuid PRIMARY KEY,
|
|
incident_id uuid NOT NULL REFERENCES incidents(id) ON DELETE CASCADE,
|
|
author text NOT NULL CHECK (char_length(author) BETWEEN 1 AND 160),
|
|
body text NOT NULL CHECK (char_length(body) BETWEEN 1 AND 2000),
|
|
created_at timestamptz NOT NULL DEFAULT now()
|
|
);
|
|
|
|
CREATE INDEX incident_notes_history_idx ON incident_notes (incident_id, created_at ASC, id ASC);
|