Files
short/drizzle/0002_user_palettes.sql
traberphandClaude Opus 5.5 e44e56fd2d Save imported palettes per user and assign single palette colors
- imported coolors.co palettes are stored per user (new palettes
  table, GET/POST/DELETE /palettes, duplicates ignored, max 50) and
  listed under "Your palettes" with a remove button
- clicking a single color of any palette opens a menu to use it as
  background, text, buttons or button text; the name row still
  applies the whole palette
- theme picker moved into its own component

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 16:46:36 +02:00

9 lines
378 B
SQL

CREATE TABLE `palettes` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`user_id` integer NOT NULL,
`colors` text NOT NULL,
`created_at` integer DEFAULT (unixepoch()) NOT NULL,
FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
);
--> statement-breakpoint
CREATE UNIQUE INDEX `palettes_user_colors` ON `palettes` (`user_id`,`colors`);