73d0b7017b
Refuses to upgrade if any of the 4 business tables still has NULL workspace_id rows (pre-flight count then RuntimeError pointing the operator at scripts/backfill_workspace_id.py). Then op.batch_alter_table flips each column to NOT NULL and adds the threads_meta (workspace_id, thread_id) UNIQUE index that PR6 routers will rely on. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>