From 13992fedaa0beaf93f6214993c95e685d249638f Mon Sep 17 00:00:00 2001 From: dev Date: Fri, 26 Jun 2026 13:54:23 +0200 Subject: chore: sync schema.sql with live database - Add missing columns to imdb: has_no_wiki_article, description, license, license_url, num_accolades, wiki_status_code, has_people - Fix links table: update to match actual DDL with story_id FK - Fix orphaned links_imdb definition (was missing CREATE TABLE header) --- schema/schema.sql | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'schema/schema.sql') diff --git a/schema/schema.sql b/schema/schema.sql index f957079..2898e6c 100644 --- a/schema/schema.sql +++ b/schema/schema.sql @@ -22,7 +22,9 @@ CREATE TABLE `imdb` ( `id` int(11) NOT NULL AUTO_INCREMENT, `imdb_id` varchar(255) NOT NULL, `wiki_article` varchar(255) DEFAULT NULL, + `has_no_wiki_article` tinyint(1) NOT NULL DEFAULT 0, `synopsis` text DEFAULT NULL, + `description` text DEFAULT NULL, `year` int(11) DEFAULT NULL, `poster_url` text DEFAULT NULL, `title_type` varchar(255) DEFAULT NULL, @@ -32,8 +34,14 @@ CREATE TABLE `imdb` ( `runtime_minutes` int(11) DEFAULT NULL, `average_rating` decimal(3,1) unsigned DEFAULT NULL, `num_votes` int(11) DEFAULT NULL, + `license` varchar(255) DEFAULT NULL, + `license_url` varchar(255) DEFAULT NULL, + `num_accolades` int(11) DEFAULT NULL, + `wiki_status_code` int(11) DEFAULT NULL, + `has_people` tinyint(1) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), UNIQUE KEY `imdb_id` (`imdb_id`), + UNIQUE KEY `wiki_article` (`wiki_article`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; @@ -64,7 +72,7 @@ CREATE TABLE `links` ( PRIMARY KEY (`id`), KEY `story_id` (`story_id`), CONSTRAINT `links_ibfk_1` FOREIGN KEY (`story_id`) REFERENCES `story` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=407448 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; DROP TABLE IF EXISTS `links_imdb`; -- cgit v1.2.3