9 lines
250 B
MySQL
9 lines
250 B
MySQL
|
-- 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)
|
||
|
);
|