Download migrations/002_create_preferences_table.sql from techprotrade/annator-command-center: direct link, hf CLI and curl.
- Browser
- Download file 549 Bytes
-
https://huggingface.co/spaces/techprotrade/annator-command-center/resolve/main/migrations/002_create_preferences_table.sql
- Command line
-
hf download hf://spaces/techprotrade/annator-command-center/migrations/002_create_preferences_table.sql
-
curl -L -o 002_create_preferences_table.sql https://huggingface.co/spaces/techprotrade/annator-command-center/resolve/main/migrations/002_create_preferences_table.sql
549 Bytes
| CREATE TABLE IF NOT EXISTS user_preferences ( | |
| id UUID PRIMARY KEY DEFAULT uuid_generate_v4(), | |
| user_id VARCHAR(255) NOT NULL, | |
| workspace_id VARCHAR(255) NOT NULL, | |
| key VARCHAR(255) NOT NULL, | |
| value TEXT, -- JSON value stringified or simple text | |
| created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP, | |
| updated_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP, | |
| UNIQUE(user_id, workspace_id, key) | |
| ); | |
| CREATE INDEX IF NOT EXISTS idx_user_preferences_lookup ON user_preferences(user_id, workspace_id); | |