Unique constraint
Unique constraint when creating a table
Example of table
CREATE TABLE notifications_sent(
user_id INT NOT NULL REFERENCES users(id),
notification_identifier INT NOT NULL,
ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
UNIQUE (user_id, notification_identifier)
);
0 Comments
Add Comment
Log in to add a comment