quivr/scripts/20230701180101_add_prompts_table.sql
Mamadou DICKO e3b6114248
feat(prompt): add prompt table, entity and repository (#823)
* feat: add prompts table

* feat: add Prompt entity

* feat: add prompt router

* refactor(promptRepository): use common reposority
2023-08-03 09:53:38 +02:00

20 lines
464 B
PL/PgSQL

BEGIN;
-- Create user_identity table if it doesn't exist
CREATE TABLE IF NOT EXISTS prompts (
id UUID DEFAULT uuid_generate_v4() PRIMARY KEY,
title VARCHAR(255),
content TEXT,
status VARCHAR(255) DEFAULT 'private'
);
-- Insert migration record if it doesn't exist
INSERT INTO migrations (name)
SELECT '20230701180101_add_prompts_table'
WHERE NOT EXISTS (
SELECT 1 FROM migrations WHERE name = '20230701180101_add_prompts_table'
);
COMMIT;