Add player profiles and community settings
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -63,6 +63,24 @@ func TestMigrationsAndReadiness(t *testing.T) {
|
||||
t.Fatalf("%s table is missing", table)
|
||||
}
|
||||
}
|
||||
var identityColumns int
|
||||
if err := store.pool.QueryRow(ctx, `SELECT count(*) FROM information_schema.columns
|
||||
WHERE table_name='players' AND column_name IN ('display_name','battle_tag')`).Scan(&identityColumns); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if identityColumns != 2 {
|
||||
t.Fatalf("player identity migration is incomplete: found %d columns", identityColumns)
|
||||
}
|
||||
var settingsTable, nicknameIndex, seriesEventIndex bool
|
||||
if err := store.pool.QueryRow(ctx, `SELECT
|
||||
to_regclass('public.community_settings') IS NOT NULL,
|
||||
to_regclass('public.players_display_name_lower_uidx') IS NOT NULL,
|
||||
to_regclass('public.series_event_id_idx') IS NOT NULL`).Scan(&settingsTable, &nicknameIndex, &seriesEventIndex); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if !settingsTable || !nicknameIndex || !seriesEventIndex {
|
||||
t.Fatalf("profile/settings migrations missing: settings=%v nickname=%v series=%v", settingsTable, nicknameIndex, seriesEventIndex)
|
||||
}
|
||||
}
|
||||
|
||||
func TestDiscordRoleSyncPersistence(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user