Repair a saved query's column metadata
repair_query_metadataRe-introspect and refresh a saved query's column metadata after schema changes, leaving SQL and datasource untouched. Reports stored-vs-live diff by default; apply writes refreshed metadata.
Instructions
Re-introspect and store a saved query's COLUMN METADATA without touching its SQL or datasource binding — safe by construction (name/datasources/raw_sql/sql_form are re-sent verbatim; only columns is refreshed from a live execution). Stale stored metadata makes bound blocks render blank/wrong after schema or version moves; migration_preflight flags it as stored_metadata_stale. Dry-run by default: reports the stored-vs-live diff; pass apply:true to write. Round-trip verifies the write and mirrors it to version control.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apply | No | Write the refreshed metadata (default false = report the diff only). | |
| params | No | Parameters for a parameterized query, as a { name: value } map. | |
| query_id | Yes | Saved query UUID. |