MG22 — CREATE/DROP without IF [NOT] EXISTS is not idempotent
Group: Migration safety · Auto-fixable: no
A CREATE TABLE/INDEX or DROP without IF [NOT] EXISTS errors on re-run, so a migration that partially applied cannot be retried cleanly. Outside a transaction, prefer the idempotent form.
Example
Section titled “Example”bad: CREATE TABLE t (a int);good: CREATE TABLE IF NOT EXISTS t (a int);Configure
Section titled “Configure”Disable this rule in banshee.toml:
[lint]exclude = ["MG22"]Or silence one line with -- noqa: MG22. See Linting.