


CREATE TABLE IF NOT EXISTS album_likes (
    user_id    INT UNSIGNED NOT NULL,
    album_id   INT UNSIGNED NOT NULL,
    type       ENUM('like','dislike') NOT NULL,
    ip_address VARCHAR(45) DEFAULT NULL,
    created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    PRIMARY KEY (user_id, album_id),
    KEY idx_album_likes_album (album_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

ALTER TABLE comments MODIFY COLUMN video_id INT UNSIGNED NULL;
ALTER TABLE comments ADD COLUMN album_id INT UNSIGNED NULL AFTER video_id;
ALTER TABLE comments ADD INDEX idx_comments_album (album_id);
