A
Admin

Draft SQL migration with real schema

draft-sql-migration

Configuration
GEN-CODE
deepseek-v4-pro
pool: default
enabled
Max tokens: 8000
Temp: 0.1
Max workers: 1
Output: sql
Budget/run: $0.3
Budget/day: $10
Tags (auto-inject lessons):
sql
migration
postgres
rls
Retry: {"token_bump":1.5,"max_retries":1}
Context sources (1)
{
  "type": "sql_schema",
  "tables_param": "tables"
}
Validation rules (2)
{
  "type": "must_contain",
  "value": "agencecom."
}
{
  "lang": "sql",
  "type": "contains_block"
}
Prompt template
Tu es DBA senior Postgres. Genere migration SQL idempotente.

{{schema_context}}

SPECS:
{{specs}}

REGLES: schema prefix agencecom., IF NOT EXISTS, DO blocks idempotence, DROP IF EXISTS sur policies avant recreate, jamais DROP TABLE sans IF EXISTS et review DG.

REPONDS UNIQUEMENT bloc sql.