2024-02-20 02:30:39 +00:00
|
|
|
CREATE TABLE channels (
|
2024-04-12 01:06:12 +00:00
|
|
|
id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
|
|
|
name VARCHAR(255) NOT NULL,
|
2024-02-20 02:30:39 +00:00
|
|
|
description TEXT NOT NULL,
|
2024-04-12 01:06:12 +00:00
|
|
|
link VARCHAR(255) NULL,
|
|
|
|
language VARCHAR(2) NOT NULL,
|
|
|
|
copyright VARCHAR(255) NULL,
|
|
|
|
explicit BOOLEAN DEFAULT false,
|
|
|
|
category VARCHAR(255),
|
2024-02-20 02:30:39 +00:00
|
|
|
|
|
|
|
owner_id INT(11) UNSIGNED NOT NULL,
|
|
|
|
image_id INT(11) UNSIGNED NOT NULL,
|
|
|
|
|
|
|
|
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|
|
|
|
|
|
|
PRIMARY KEY(`id`),
|
|
|
|
FOREIGN KEY(`owner_id`) REFERENCES users(`id`),
|
|
|
|
FOREIGN KEY(`image_id`) REFERENCES images(`id`),
|
|
|
|
UNIQUE KEY(`name`)
|
2024-05-13 23:52:05 +00:00
|
|
|
);
|