backend/migrations/2023-08-27-161051_subscription/up.sql
2023-08-30 09:22:44 +02:00

9 lines
250 B
SQL

-- Your SQL goes here
CREATE TABLE subscription (
subscription_id BIGINT AUTO_INCREMENT NOT NULL ,
user_id BIGINT NOT NULL,
channel_id BIGINT NOT NULL,
PRIMARY KEY(subscription_id),
CONSTRAINT UC_Sub UNIQUE(user_id,channel_id)
);