blob: 60acbcc2d732e975583f25a81ca8378528f915aa (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
-- Create user_settings table for per-user feature flags and preferences
CREATE TABLE IF NOT EXISTS user_settings (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
owner_id UUID NOT NULL,
key TEXT NOT NULL,
value JSONB NOT NULL DEFAULT '"false"'::jsonb,
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),
UNIQUE(owner_id, key)
);
CREATE INDEX idx_user_settings_owner ON user_settings(owner_id);
|