SELECT table_name FROM information_schema.columns WHERE table_schema='public' ...ALTER TABLE orders ENABLE ROW LEVEL SECURITY;CREATE POLICY tenant_isolation ON orders USING (tenant_id=current_setting('app...CREATE INDEX idx_orders_tenant_status ON orders(tenant_id, status);CREATE OR REPLACE PROCEDURE tenant_purge(p UUID) LANGUAGE plpgsql AS $$ BEGIN ...SET app.tenant_id='tenant-uuid'; SELECT COUNT(*) FROM orders;CALL tenant_purge('uuid-to-delete');Orbis SaaS has hit critical scale: their single-schema multi-tenant database is leaking data between tenants (a bug in WHERE clauses missing tenant_id), performance degrades as top tenants grow, and GDPR requires hard-deletion of all data for a specific tenant within 30 days. You must redesign the isolation model, implement Row Level Security, create tenant-aware connection pooling, and build a GDPR purge procedure — all without downtime.
-- comment or REPORT statement