check_before_apply
Validate PostgreSQL migrations before execution and block unsafe DDL by returning a pass/fail verdict based on safety rules and lock classification.
Instructions
Safety gate: call this BEFORE writing or executing any PostgreSQL DDL or migration. Resolves the project's own MigrationPilot config (rule toggles, severity overrides, failOn threshold) exactly like the CLI, then returns a pass/fail verdict. On "fail", do not apply the migration — fix the blocking violations and check again.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | The exact SQL that is about to be written or executed | |
| pgVersion | No | Target PostgreSQL version. Defaults to the config's pgVersion, or 17. | |
| configPath | No | Path to a config file, or a directory to resolve config from. Defaults to searching upward from the working directory, exactly like the CLI. |