♻️ Refactor migrations.

This commit is contained in:
Andrey Antukh 2020-09-21 15:58:56 +02:00 committed by Alonso Torres
parent 1b598e2f6d
commit dda6a96407
25 changed files with 75 additions and 70 deletions

View file

@ -0,0 +1,9 @@
CREATE TABLE presence (
file_id uuid NOT NULL REFERENCES file(id) ON DELETE CASCADE,
profile_id uuid NOT NULL REFERENCES profile(id) ON DELETE CASCADE,
session_id uuid NOT NULL,
updated_at timestamptz NOT NULL DEFAULT clock_timestamp(),
PRIMARY KEY (file_id, session_id, profile_id)
);