schemaLint
schemaLintAudits a database table or schema for modeling and indexing risks—missing primary keys, unindexed foreign keys, nullable unique columns, and more—and returns findings to guide fixes.
Instructions
Audit one table or a schema for modeling and indexing risks: missing PKs, unindexed or mismatched FKs, nullable unique columns, missing CHECKs/remarks, orphan *_id columns, isolation and wide tables. Returns findings, not general table metadata.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | No | Omit to scan the schema. | |
| checks | No | Checks CSV, e.g. missingPrimaryKey,fkWithoutIndex; omit for defaults. | |
| schema | No | ||
| maxTables | No | Tables to scan (default 50). | |
| connection | Yes | Database to run against. Call listConnections for valid names; do not guess. | |
| maxFindings | No | Findings to return (default 200). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | No | ||
| checks | No | Schema lint checks that were enabled for this audit. | |
| schema | No | ||
| findings | No | Schema lint or redundant-index findings. | |
| truncated | Yes | True when the configured row or finding cap was reached and more data may exist. | |
| findingCount | Yes | Number of lint findings returned or counted. | |
| tablesScanned | Yes | Number of tables inspected by the tool before caps were applied. |