Rules Overview
Squawk's rules focus on ensuring safe migrations and warn about statements that could block reads / writes or break existing clients. See the sidebar for documentation for each rule.
The rule docs should provide actionable, user friendly error messages. If you find a rule, error message, or docs page lacking, please open an issue.
Reminder
Read "Running Migrations to learn about safely applying migrations after linting.
index
- rules
- adding-field-with-default
- adding-foreign-key-constraint
- adding-not-nullable-field
- adding-required-field
- adding-serial-primary-key-field
- ban-char-field
- ban-concurrent-index-creation-in-transaction
- ban-drop-column
- ban-drop-database
- ban-drop-default
- ban-drop-function
- ban-drop-not-null
- ban-drop-table
- ban-drop-trigger
- ban-drop-type
- ban-drop-view
- changing-column-type
- constraint-missing-not-valid
- disallowed-unique-constraint
- prefer-bigint-over-int
- prefer-bigint-over-smallint
- prefer-identity
- prefer-robust-stmts
- prefer-text-field
- prefer-timestamptz
- renaming-column
- renaming-table
- require-concurrent-index-creation
- require-concurrent-index-deletion
- transaction-nesting
- ban-create-domain-with-constraint
- ban-alter-domain-with-add-constraint
- ban-truncate-cascade
- syntax-error
- require-timeout-settings
- require-lock-timeout
- require-statement-timeout
- ban-uncommitted-transaction
- require-enum-value-ordering
- require-table-schema
- identifier-too-long
- require-concurrent-partition-detach
- require-concurrent-reindex
- prefer-repack
- ban-duplicate-column-assignments
- ban-drop-schema
- ban-drop-sequence
- ban-drop-domain
- ban-drop-constraint
- ban-drop-generated-expression
- renaming-object
- ban-set-schema
- ban-alter-identity
- ban-drop-extension
- ban-alter-generated-expression
- ban-drop-index
- ban-set-default
- ban-disable-trigger
- ban-replica-identity
- ban-drop-policy
- ban-revoke
- ban-replace-view-function
- ban-create-policy
- ban-alter-policy-condition
- ban-alter-policy-roles
- ban-alter-function-options
- ban-alter-view-options
- ban-alter-role-options
- ban-alter-database-options
- ban-alter-row-level-security
- ban-new-write-restriction
- ban-add-enum-value
- ban-add-composite-attribute
- ban-add-column
- ban-detach-inheritance
- ban-alter-sequence-values
- ban-alter-system-options
- ban-alter-extension