refactor(skills): remove subcategory field from skills

Drop subcategory column from database schema and update constraints
Remove subcategory handling from backend queries and API endpoints
Clean up frontend components and admin views to reflect the change
This commit is contained in:
2026-04-30 15:24:19 +08:00
parent 3e8265e0c8
commit 02f6dd47c3
11 changed files with 56 additions and 97 deletions

View File

@@ -40,11 +40,12 @@ CREATE INDEX IF NOT EXISTS user_sessions_user_id_idx
CREATE TABLE IF NOT EXISTS skills (
id integer GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
name text NOT NULL,
subcategory text,
UNIQUE (name, subcategory)
name text NOT NULL UNIQUE
);
ALTER TABLE skills DROP COLUMN IF EXISTS subcategory;
CREATE UNIQUE INDEX IF NOT EXISTS skills_name_key ON skills(name);
CREATE TABLE IF NOT EXISTS favorite_things (
id integer GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
name text NOT NULL UNIQUE