0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 00:40:30 -05:00
penpot/backend/resources/migrations/0006-add-presence-tables.sql
2020-05-26 13:03:54 +02:00

9 lines
298 B
SQL

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)
);