diff --git a/scripts/init_database/create_conv_store.sql b/scripts/init_database/create_conv_store.sql index 558b2c4..c13c1c1 100644 --- a/scripts/init_database/create_conv_store.sql +++ b/scripts/init_database/create_conv_store.sql @@ -14,4 +14,8 @@ CREATE TABLE IF NOT EXISTS messages ( CREATE INDEX IF NOT EXISTS idx_messages_conversation ON messages (conversation_id, sequence_number); -- Index for fast lookup by pipeline_id -CREATE INDEX IF NOT EXISTS idx_messages_pipeline ON messages (pipeline_id); \ No newline at end of file +CREATE INDEX IF NOT EXISTS idx_messages_pipeline ON messages (pipeline_id); + +-- Grant permissions to app user +GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO myapp_user; +GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO myapp_user; \ No newline at end of file diff --git a/scripts/init_database/create_prompt_config.sql b/scripts/init_database/create_prompt_config.sql index 1d6330f..2a49951 100644 --- a/scripts/init_database/create_prompt_config.sql +++ b/scripts/init_database/create_prompt_config.sql @@ -42,6 +42,10 @@ CREATE TABLE IF NOT EXISTS prompt_templates ( CREATE INDEX IF NOT EXISTS idx_prompt_templates_set_id ON prompt_templates(prompt_set_id); +-- Grant permissions to app user +GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO myapp_user; +GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO myapp_user; + -- Seed: initial prompt set for lang_agent/graphs/routing.py -- The pipeline_id can be used by RoutingConfig.pipeline_id to load these prompts. INSERT INTO prompt_sets (pipeline_id, graph_id, name, description, is_active, list)