diff --git a/drizzle/0001_elite_odin.sql b/drizzle/0001_elite_odin.sql index 8c6c131..a3ad041 100644 --- a/drizzle/0001_elite_odin.sql +++ b/drizzle/0001_elite_odin.sql @@ -18,8 +18,25 @@ CREATE TABLE `__new_movies` ( `favorite` integer DEFAULT false ); --> statement-breakpoint -INSERT INTO `__new_movies`("id", "title", "overview", "popularity", "poster_path", "release_date", "seen", "favorite") -SELECT "id", "title", "overview", "popularity", "poster_path", "release_date", "seen", "favorite" FROM `movies`;--> statement-breakpoint +INSERT INTO `__new_movies`("id", "title", "overview", "popularity", "poster_path", "release_date", "seen", "favorite", "adult", "backdrop_path", "genre_ids", "original_language", "original_title", "video", "vote_average", "vote_count") +SELECT + "id", + "title", + "overview", + "popularity", + "poster_path", + "release_date", + "seen", + "favorite", + 0 as "adult", -- wartość domyślna + '' as "backdrop_path", -- wartość domyślna + '[]' as "genre_ids", -- wartość domyślna (pusta tablica JSON) + 'pl-PL' as "original_language", -- wartość domyślna + "title" as "original_title", -- kopiuj z title + 0 as "video", -- wartość domyślna + 0.0 as "vote_average", -- wartość domyślna + 0 as "vote_count" -- wartość domyślna +FROM `movies`;--> statement-breakpoint DROP TABLE `movies`;--> statement-breakpoint ALTER TABLE `__new_movies` RENAME TO `movies`;--> statement-breakpoint PRAGMA foreign_keys=ON; \ No newline at end of file