quivr/scripts/202309127004032_add_user_limits.sql
Stan Girard 322ee318be
feat: the good user management (#1158)
* feat(user_management): added user management

* feat(user_management): added user management

* feat(user_management): removed print

* feat: use tanstack query for user data fecthing

* feat: add getUser to sdk

* feat: improve user page ux use tanstack query

* feat: fetch models from backend on brains settings page

* feat: update model selection on chat page

* feat: update tests

---------

Co-authored-by: mamadoudicko <mamadoudicko100@gmail.com>
2023-09-13 13:47:12 +02:00

20 lines
525 B
SQL

-- Assuming you have a table named "prompts" with columns: "title", "content", "status"
CREATE TABLE IF NOT EXISTS user_settings (
user_id UUID PRIMARY KEY,
models JSONB DEFAULT '["gpt-3.5-turbo"]'::jsonb,
max_requests_number INT DEFAULT 50,
max_brains INT DEFAULT 5,
max_brain_size INT DEFAULT 1000000
);
-- Update migrations table
INSERT INTO migrations (name)
SELECT '202309127004032_add_user_limits'
WHERE NOT EXISTS (
SELECT 1 FROM migrations WHERE name = '202309127004032_add_user_limits'
);
COMMIT;