Skip to content

Rules ​

Every rule is an error by default, except those marked warn. Change a rule's severity in the config, for example { "rules": { "no-rename-column": "warn" } }, or set it to "off".

To accept one finding, put a suppression comment with a reason above the statement:

ts
// preflight safety-assured <rule-id> -- <reason>

Data loss ​

RuleReports
no-drop-and-recreate-columnA column dropped and added again in one migration
possible-rename-data-lossOne column dropped and another added, with no data copied (warn)
no-drop-columnA dropped column
no-drop-tableA dropped table
no-truncateTRUNCATE or clearTable()
typeorm/no-changecolumn-recreatechangeColumn() that drops and re-adds the column
typeorm/no-enum-recreateTypeORM 0.3's enum change by recreating the type (warn)

Deploy safety ​

RuleReports
no-rename-columnA renamed column
no-rename-tableA renamed table

Locking (PostgreSQL only) ​

RuleReports
require-concurrent-indexCREATE INDEX without CONCURRENTLY
concurrent-index-transactionCONCURRENTLY where it runs inside a transaction
no-add-not-null-without-defaultA NOT NULL column added without a default
no-volatile-defaultA column added with a volatile default, or as serial, identity, or stored generated
no-unsafe-column-type-changeA column type change that rewrites the table
require-not-valid-foreign-keyA foreign key added without NOT VALID
no-set-not-nullSET NOT NULL on an existing column
require-not-valid-checkA CHECK constraint added without NOT VALID
require-concurrent-uniqueA unique constraint or primary key added in place
require-concurrent-index-dropDROP INDEX without CONCURRENTLY (warn)
no-blocking-maintenanceVACUUM FULL, CLUSTER, or REINDEX without CONCURRENTLY
enum-value-used-in-same-transactionA new enum value used before the transaction that adds it commits
require-lock-timeoutA change to an existing table without lock_timeout (off, opt-in)

Correctness ​

RuleReports
unanalyzable-statementA statement orm-preflight could not read (warn)
invalid-suppressionA suppression comment with no reason or an unknown rule
no-edit-applied-migrationWith --changed-since: an edit to an applied migration
require-downAn empty or missing down() (warn)
typeorm/transaction-override-forbiddentransaction set on a migration in transaction mode "all"
typeorm/invalid-migration-nameA migration name without a 13-digit timestamp