PostgreSQL 17 runners are live
All rules

SDB503[high]Data-dependent

NOT NULL column added without a default

Fails on any table that already has rows.

Why it's risky in PostgreSQL

Existing rows have no value for the new column, so the statement errors on a non-empty table.

What triggers it, and the safer way

unsafe.sql
ALTER TABLE users ADD COLUMN plan text NOT NULL;
safer.sql
ALTER TABLE users ADD COLUMN plan text NOT NULL DEFAULT 'free';

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 SDB503 <why this is safe here>

Applies to PostgreSQL 14, 15, 16, 17.