PRAGMA foreign_keys=OFF;--> statement-breakpoint
CREATE TABLE `__new_movies` (
	`id` integer PRIMARY KEY NOT NULL,
	`title` text NOT NULL,
	`adult` integer NOT NULL,
	`backdrop_path` text NOT NULL,
	`genre_ids` text NOT NULL,
	`original_language` text NOT NULL,
	`original_title` text NOT NULL,
	`overview` text NOT NULL,
	`popularity` real NOT NULL,
	`poster_path` text NOT NULL,
	`release_date` text NOT NULL,
	`video` integer NOT NULL,
	`vote_average` real NOT NULL,
	`vote_count` integer NOT NULL,
	`seen` integer DEFAULT false,
	`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
DROP TABLE `movies`;--> statement-breakpoint
ALTER TABLE `__new_movies` RENAME TO `movies`;--> statement-breakpoint
PRAGMA foreign_keys=ON;