CoolFace
Apppublic

prazy1208/text2sql

sourceHugging Faceupdated 4mo agoView on Hugging Face
0likes
migration_add_table_agent_output.sql14 linesDownload Raw Back to scripts
1-- Migration: add app_schema.table_agent_output (Table Agent 5a).2-- Run once on databases that were created with an older create_app_schema.sql3-- (before table_agent_output existed). Safe to run if table already exists.4 5CREATE TABLE IF NOT EXISTS app_schema.table_agent_output (6    id                 SERIAL PRIMARY KEY,7    intent_output_id   INT NOT NULL REFERENCES app_schema.intent_agent_output(id) ON DELETE CASCADE,8    selected_tables    TEXT[] NOT NULL DEFAULT '{}',9    created_at         TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,10    UNIQUE (intent_output_id)11);12 13COMMENT ON TABLE app_schema.table_agent_output IS 'Table Agent: selected_tables for one intent_agent_output row';14