2024-02-20 02:30:39 +00:00
|
|
|
CREATE TABLE episodes (
|
2024-04-12 01:06:12 +00:00
|
|
|
id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
|
|
|
title VARCHAR(255) NOT NULL,
|
|
|
|
link VARCHAR(255) NOT NULL,
|
|
|
|
duration VARCHAR(127) NOT NULL COMMENT "HH:MM:SS representation",
|
|
|
|
length INT(11) UNSIGNED NOT NULL COMMENT "Length in seconds",
|
2024-02-20 02:30:39 +00:00
|
|
|
description TEXT NOT NULL,
|
|
|
|
|
|
|
|
explicit BOOLEAN NOT NULL DEFAULT true,
|
|
|
|
|
2024-04-12 01:06:12 +00:00
|
|
|
channel_id INT(11) UNSIGNED NOT NULL,
|
|
|
|
image_id INT(11) UNSIGNED NOT NULL,
|
2024-02-20 02:30:39 +00:00
|
|
|
|
|
|
|
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|
|
|
|
|
|
|
PRIMARY KEY(`id`),
|
|
|
|
FOREIGN KEY(`channel_id`) REFERENCES channels(`id`),
|
|
|
|
FOREIGN KEY(`image_id`) REFERENCES images(`id`)
|
2024-05-13 23:52:05 +00:00
|
|
|
);
|