orm-preflight

v1.2.0
io.github.sikandar100/orm-preflight Checked 13 hours ago Published 1 month ago

Checks TypeORM migrations for data loss, table locks, and deploy problems before they run.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

check_migrations Check migrations

Checks database migrations for data loss, table locks, and deploy problems. Returns every finding with what happens, why, and a safe alternative. Run it after writing or changing a migration. Without files, it checks the migrations configured for the project, or every migrations folder.

ParameterTypeDescription
changedSincestringA git ref, such as origin/main. Checks only migrations added or changed since the branch left it.
dialectThe database. Default: the config, or postgres.
filesarrayMigration files or globs, relative to projectDir, such as ["src/migrations/1727200000000-AddEmail.ts"].
postgresVersionintegerThe PostgreSQL major version. Default: the config, or 16.
projectDirstringAbsolute path of the project root, where package.json is. Default: the directory the server started in.

explain_rule Explain a rule

Returns a rule's documentation: what happens, bad and safe examples, when a suppression is fine, and the PostgreSQL, MySQL, or TypeORM sources behind it.

ParameterTypeDescription
rule *stringThe rule ID, such as no-drop-column.

list_rules List rules

Lists every rule with its category, default severity, and databases.