feat: add registration and authentication
This commit is contained in:
13
docs/auth-rollout.md
Normal file
13
docs/auth-rollout.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Auth rollout
|
||||
|
||||
Before applying auth and ownership migrations in production:
|
||||
|
||||
1. Run `pg_dump` for the target database and keep the dump until verification is complete.
|
||||
2. Record the rollback command for restoring that dump if migration or legacy race claiming fails.
|
||||
3. Record the current race count with `SELECT count(*) FROM races;`.
|
||||
4. Run migrations.
|
||||
5. 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;` is `0` before planning the follow-up `NOT NULL` migration.
|
||||
|
||||
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.
|
||||
Reference in New Issue
Block a user