An object is dropped without IF EXISTS

tx0/sql:drop-without-if-existsstrictwarningmaintainability/designdepth fastmaintainability

What it finds

DROP TABLE t fails when t does not exist, so a script that is run twice, or against a database in another state, stops halfway. DROP ... IF EXISTS makes the script repeatable.

From the rule's source, drop_without_if_exists.rs.

Turn it on, off or suppress it

The rule runs from the strict tier up. To turn it on in a lower tier, give it a level in tx0.toml:

tx0.toml
[rules]
"tx0/sql:drop-without-if-exists" = "warning"

To keep one finding, suppress it with a reason: tx0 suppress ID --reason "..." writes the comment for it.

tx0 explain tx0/sql:drop-without-if-exists shows the same in the terminal. Found a false positive? Report it.