CREATE TABLE IF NOT EXISTS video_translations (
    id          INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
    video_id    INT UNSIGNED NOT NULL,
    lang_code   VARCHAR(5) NOT NULL,
    title       VARCHAR(500) DEFAULT NULL,
    slug        VARCHAR(500) DEFAULT NULL,
    description TEXT DEFAULT NULL,
    created_at  DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    updated_at  DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    UNIQUE INDEX idx_video_lang (video_id, lang_code),
    FOREIGN KEY (video_id) REFERENCES videos(id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
