mirror of
https://github.com/NicholaiVogel/dashore-incubator.git
synced 2026-03-31 06:40:32 +00:00
- add D1 database with drizzle ORM for wishlist data - create wishlist items, votes, and comments tables - implement server actions for CRUD, voting, comments - add wishlist page with auth protection - create components: stats, filters, item cards, add dialog, detail drawer - add optimistic updates for voting - update sidebar navigation with Infrastructure Wishlist link - configure middleware to use WORKOS_REDIRECT_URI env var for local dev
31 lines
907 B
SQL
31 lines
907 B
SQL
CREATE TABLE `wishlist_comments` (
|
|
`id` text PRIMARY KEY NOT NULL,
|
|
`item_id` text NOT NULL,
|
|
`user_id` text NOT NULL,
|
|
`user_name` text NOT NULL,
|
|
`content` text NOT NULL,
|
|
`created_at` text NOT NULL,
|
|
FOREIGN KEY (`item_id`) REFERENCES `wishlist_items`(`id`) ON UPDATE no action ON DELETE cascade
|
|
);
|
|
--> statement-breakpoint
|
|
CREATE TABLE `wishlist_items` (
|
|
`id` text PRIMARY KEY NOT NULL,
|
|
`name` text NOT NULL,
|
|
`description` text NOT NULL,
|
|
`category` text NOT NULL,
|
|
`priority` text NOT NULL,
|
|
`estimated_cost` real,
|
|
`link` text,
|
|
`submitted_by` text NOT NULL,
|
|
`submitted_by_name` text NOT NULL,
|
|
`created_at` text NOT NULL
|
|
);
|
|
--> statement-breakpoint
|
|
CREATE TABLE `wishlist_votes` (
|
|
`id` text PRIMARY KEY NOT NULL,
|
|
`item_id` text NOT NULL,
|
|
`user_id` text NOT NULL,
|
|
`created_at` text NOT NULL,
|
|
FOREIGN KEY (`item_id`) REFERENCES `wishlist_items`(`id`) ON UPDATE no action ON DELETE cascade
|
|
);
|