← all rules

rename

warning

RENAME

Why it's unsafe

Renaming this column breaks every application query, view, and function that references the old name.

Safe rewrite

Avoid renames in a rolling deploy. Prefer expand/contract: add the new name, dual-write, migrate readers, then drop the old name — or use a view to alias during the transition.

Example

Try it in the playground →

Unsafe

ALTER TABLE users RENAME COLUMN email TO email_address;

Related