rename
Rename with expand and contract.
Severity: warning · Lock: ACCESS EXCLUSIVE
The rename itself is instant, but app servers still running the old code keep using the old name during the deploy, and their queries fail.
Instead of
Section titled “Instead of”ALTER TABLE users RENAME COLUMN email TO email_address;ALTER TABLE users ADD COLUMN email_address text;-- Write both, backfill, move reads to email_address,-- then drop email in a later deploy.To skip this rule for one statement, put -- pgdeadbolt-ignore rename on the line above it.