2024-08-01 20:11:13 +00:00
|
|
|
-- records table schema
|
2024-08-01 19:16:35 +00:00
|
|
|
CREATE TABLE api.records (
|
|
|
|
id INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
|
|
|
|
url TEXT NOT NULL,
|
2024-08-01 20:11:13 +00:00
|
|
|
discord_message_id TEXT NOT NULL,
|
2024-08-02 23:00:49 +00:00
|
|
|
recording_state TEXT NOT NULL DEFAULT 'pending',
|
2024-08-03 01:29:02 +00:00
|
|
|
file_size BIGINT NOT NULL DEFAULT 0,
|
|
|
|
is_aborted BOOLEAN NOT NULL DEFAULT FALSE
|
2024-08-01 19:16:35 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
-- roles & permissions for our backend automation user
|
2024-08-01 19:33:36 +00:00
|
|
|
GRANT all ON api.records TO automation;
|
2024-08-01 20:11:13 +00:00
|
|
|
GRANT SELECT ON api.records TO web_anon;
|