Deploy from Lumerel

This commit is contained in:
Lumerel Deploy
2026-03-27 02:09:43 +00:00
commit 275b186586
11 changed files with 2435 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
<?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
)");

View File

@@ -0,0 +1,5 @@
<?php
$cols = $pdo->query("SHOW COLUMNS FROM watchlist LIKE 'for_whom'")->fetchAll();
if (empty($cols)) {
$pdo->exec("ALTER TABLE watchlist ADD COLUMN for_whom ENUM('all', 'nik', 'tod') NOT NULL DEFAULT 'all' AFTER type");
}