Files
huly-platform/packages/cockroach/migrations/06_notification.sql
T
KristinaandGitHub e2de49ec97 Update types & db schema (#3)
* Update types & db schema
2024-12-23 16:38:49 +04:00

10 lines
298 B
SQL

CREATE TABLE IF NOT EXISTS notification
(
message_id UUID NOT NULL,
context UUID NOT NULL,
PRIMARY KEY (message_id, context),
FOREIGN KEY (message_id) REFERENCES message (id) ON DELETE CASCADE,
FOREIGN KEY (context) REFERENCES notification_context (id) ON DELETE CASCADE
);