diff options
| author | dev | 2026-06-26 13:54:23 +0200 |
|---|---|---|
| committer | dev | 2026-06-26 13:54:23 +0200 |
| commit | 13992fedaa0beaf93f6214993c95e685d249638f (patch) | |
| tree | 1a1ae0ee94bcedb188e40fece7efba0154059342 | |
| parent | 64ef4e5f48e31e3f003fd4abf0c499e87beb3c43 (diff) | |
| download | hnimdbbot-13992fedaa0beaf93f6214993c95e685d249638f.tar.gz | |
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)
| -rw-r--r-- | schema/schema.sql | 10 |
1 files changed, 9 insertions, 1 deletions
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`; |
