mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-25 20:32:11 +03:00
7532b558c7
* feat: add user user identity table * feat: add user openai api key input * feat: add encryption missing message * chore: log more details about 422 errors * docs(API): update api creation path * feat: use user openai key if defined
17 lines
403 B
PL/PgSQL
17 lines
403 B
PL/PgSQL
BEGIN;
|
|
|
|
-- Create user_identity table if it doesn't exist
|
|
CREATE TABLE IF NOT EXISTS user_identity (
|
|
user_id UUID PRIMARY KEY,
|
|
openai_api_key VARCHAR(255)
|
|
);
|
|
|
|
-- Insert migration record if it doesn't exist
|
|
INSERT INTO migrations (name)
|
|
SELECT '20230731172400_add_user_identity_table'
|
|
WHERE NOT EXISTS (
|
|
SELECT 1 FROM migrations WHERE name = '20230731172400_add_user_identity_table'
|
|
);
|
|
|
|
COMMIT;
|