Skip to content

Commit

Permalink
feat(sql): Add attachments table
Browse files Browse the repository at this point in the history
  • Loading branch information
abdulrahman1s committed Jun 28, 2022
1 parent 03e105e commit 5c7d3ae
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions assets/migrations/00001_init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,14 @@ CREATE TABLE IF NOT EXISTS account_invites (
code TEXT NOT NULL,
used BOOLEAN DEFAULT FALSE,
taken_by BIGINT
);

CREATE TABLE IF NOT EXISTS attachments (
id BIGINT PRIMARY KEY,
uploader_id BIGINT NOT NULL,
name TEXT NOT NULL,
meta JSONB NOT NULL DEFAULT '{}'::jsonb,
tag TEXT,
size INTEGER NOT NULL,
FOREIGN KEY (uploader_id) REFERENCES users(id) ON DELETE CASCADE
);

0 comments on commit 5c7d3ae

Please sign in to comment.