docs: rename test-account index to match users_v2 convention

Post-review fix for Task 1: code reviewer flagged that
idx_users_v2_is_test_account didn't match the idx_users_<suffix>
convention used by every other index in user_store.py. The
implementation commit (d163675) was amended to use
idx_users_test_account; this commit updates the plan and spec
docs so they stay in sync.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
adlee-was-taken
2026-04-10 23:52:55 -04:00
parent d16367582c
commit 3817566ed5
2 changed files with 6 additions and 6 deletions

View File

@@ -71,7 +71,7 @@ END $$;
Find the indexes block near line 338. After the existing `idx_users_banned` index (line ~344), add:
```sql
CREATE INDEX IF NOT EXISTS idx_users_v2_is_test_account ON users_v2(is_test_account)
CREATE INDEX IF NOT EXISTS idx_users_test_account ON users_v2(is_test_account)
WHERE is_test_account = TRUE;
```
@@ -142,7 +142,7 @@ Connect to the dev database and confirm:
psql -d golfgame -c "\d users_v2" | grep is_test_account
psql -d golfgame -c "\d invite_codes" | grep marks_as_test
psql -d golfgame -c "\d leaderboard_overall" | grep is_test_account
psql -d golfgame -c "\di idx_users_v2_is_test_account"
psql -d golfgame -c "\di idx_users_test_account"
```
Expected: all four commands return matching rows.
@@ -196,7 +196,7 @@ ssh root@129.212.150.189 << 'REMOTE'
-- Partial index
SELECT indexname, indexdef FROM pg_indexes
WHERE indexname = 'idx_users_v2_is_test_account';
WHERE indexname = 'idx_users_test_account';
SQL
REMOTE
```
@@ -205,7 +205,7 @@ Expected (all four present):
- `users_v2.is_test_account` with default `false`
- `invite_codes.marks_as_test` with default `false`
- `leaderboard_overall` has an `is_test_account` column
- `idx_users_v2_is_test_account` exists
- `idx_users_test_account` exists
If any of these are missing, the server didn't actually restart (or restarted but the container has a stale image). Check `docker compose logs golfgame` for the line `User store schema initialized` — if it's not there, the migration never ran.
@@ -5383,7 +5383,7 @@ Run after the server-side changes (Tasks 17) ship to each environment.
- [ ] `\d users_v2` on target DB shows `is_test_account` column with default `false`
- [ ] `\d invite_codes` shows `marks_as_test` column with default `false`
- [ ] `\d leaderboard_overall` shows `is_test_account` column
- [ ] `\di idx_users_v2_is_test_account` shows the partial index
- [ ] `\di idx_users_test_account` shows the partial index
- [ ] `SELECT count(*) FROM leaderboard_overall` returns nonzero (view re-populated after rebuild)
- [ ] Default leaderboard query still works: `curl .../api/stats/leaderboard` returns entries
- [ ] `?include_test=true` parameter is accepted (no 422/500)