PostgreSQL 17 runners are live
All rules

SDB102[high]Destructive

Column dropped

Dropping a column deletes its data and breaks clients that still select it.

Why it's risky in PostgreSQL

ALTER TABLE … DROP COLUMN is fast, but the data is gone and any query that names the column fails.

Remove the column from application code and ORM models first, deploy, then drop it.

What triggers it, and the safer way

unsafe.sql
ALTER TABLE users DROP COLUMN legacy_role;
safer.sql
-- Deploy app code that no longer uses legacy_role, then:
-- shadowdb:allow SDB102 column unused since release 41
ALTER TABLE users DROP COLUMN legacy_role;

Suppress it when you're sure

Put this comment on the line before the statement. The reason is required and shows in the report.

suppression
-- shadowdb:allow SDB102 <why this is safe here>

Applies to PostgreSQL 14, 15, 16, 17.