Files
ajet-chat/api/resources/migrations/009-create-attachments.up.sql
2026-02-17 17:30:45 -05:00

9 lines
319 B
SQL

CREATE TABLE IF NOT EXISTS attachments (
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
message_id uuid NOT NULL REFERENCES messages (id) ON DELETE CASCADE,
filename text NOT NULL,
content_type text NOT NULL,
size_bytes bigint NOT NULL,
storage_key text NOT NULL
);