mirror of
https://github.com/Xevion/xevion.dev.git
synced 2026-01-31 04:26:43 -06:00
feat: add tag color customization with hex picker
- Add nullable color column to tags table with hex validation - Build ColorPicker component with preset palette and custom hex input - Apply tag colors to project cards via border styling - Update all tag API endpoints to handle color field
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
-- Add color column to tags table (nullable hex color without hash)
|
||||
ALTER TABLE tags ADD COLUMN color VARCHAR(6) DEFAULT NULL;
|
||||
|
||||
-- Add check constraint for valid hex format (6 characters, 0-9a-fA-F)
|
||||
ALTER TABLE tags ADD CONSTRAINT tags_color_hex_format
|
||||
CHECK (color IS NULL OR color ~ '^[0-9a-fA-F]{6}$');
|
||||
|
||||
-- Create index for color lookups (optional, for future filtering)
|
||||
CREATE INDEX idx_tags_color ON tags(color) WHERE color IS NOT NULL;
|
||||
Reference in New Issue
Block a user