795 B
795 B
Auth rollout
Before applying auth and ownership migrations in production:
- Run
pg_dumpfor the target database and keep the dump until verification is complete. - Record the rollback command for restoring that dump if migration or legacy race claiming fails.
- Record the current race count with
SELECT count(*) FROM races;. - Run migrations.
- After the first email-verified user claims legacy races, verify:
SELECT count(*) FROM races;matches the pre-migration count.SELECT count(*) FROM races WHERE owner_user_id IS NULL;is0before planning the follow-upNOT NULLmigration.
Seed/import after auth requires SEED_OWNER_USER_ID or SEED_OWNER_EMAIL once users exist. It inserts missing seed races for that owner and does not overwrite user-edited races.