Implement global state management for movies; refactor RootLayout to fetch movies and wrap children in GlobalStoreProvider; enhance database schema with additional movie fields and CRUD operations.

This commit is contained in:
Norbert Maciaszek
2025-08-05 21:51:32 +02:00
parent 922e55f27f
commit 08d766bf8c
4 changed files with 77 additions and 9 deletions

View File

@@ -1,10 +1,13 @@
import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core";
import { integer, real, sqliteTable, text } from "drizzle-orm/sqlite-core";
export const movies = sqliteTable("movies", {
id: integer("id").primaryKey(),
title: text("title").notNull(),
releaseDate: text("release_date"),
posterPath: text("poster_path"),
status: text("status"), // to-watch, seen
notes: text("notes"),
overview: text("overview").notNull(),
popularity: real("popularity").notNull(),
releaseDate: text("release_date").notNull(),
posterPath: text("poster_path").notNull(),
seen: integer("seen").default(0).notNull(),
favorite: integer("favorite").default(0).notNull(),
notes: text("notes").default("").notNull(),
});