Files
movie-checklist-zpilpy/migrations/001_create_watchlist_table.php
2026-03-24 22:32:54 +00:00

14 lines
524 B
PHP

<?php
$pdo->exec("CREATE TABLE IF NOT EXISTS watchlist (
id INT AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(255) NOT NULL,
type ENUM('movie', 'show') NOT NULL DEFAULT 'movie',
streaming_service VARCHAR(100) DEFAULT NULL,
genre VARCHAR(100) DEFAULT NULL,
notes TEXT DEFAULT NULL,
watched TINYINT(1) NOT NULL DEFAULT 0,
watched_at TIMESTAMP NULL DEFAULT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
)");