Renaming
ALTER SCHEMA ... RENAME TO
ALTER SCHEMA billing RENAME TO billing_v2; What this does
Breaks every schema-qualified query, view, function, and ORM connection config that references the old schema name the instant it commits. There is no transition period at the database level.
Safe rewrite
Create the target schema and migrate objects one by one instead of renaming in place
-- Create the target schema first, then migrate objects one by one.
-- Move tables, views, and functions with ALTER ... SET SCHEMA.
-- Update application code, ORM configs, and connection strings.
-- Drop the old schema only after all references are gone.