Commit Graph

3 Commits

Author SHA1 Message Date
Houmgaor
9e59ce69e3 fix(tests): fix three CI failures on develop
- alliance recruiting default: change DEFAULT true → false in both
  0001_init.sql and 0004_alliance_recruiting.sql; new alliances should
  not be open for recruitment by default (TestSetAllianceRecruiting)
- guild_invites migration: add IF NOT EXISTS so re-running migrations
  on an existing DB does not fail with "relation already exists"
  (TestMigrateExistingDBWithoutSchemaVersion)
- test character name: shorten "Idem_Rollover_Leader" (19 chars) to
  "IdemRollLeader" to fit the VARCHAR(15) constraint
  (TestRolloverDailyRP_Idempotent)
2026-03-23 12:52:28 +01:00
Houmgaor
19a49fa0ae fix(migrations): remove explicit BEGIN/COMMIT from migrations 0012-0015
applyMigration() already wraps each file in a db.Begin()/tx.Commit()
transaction. The inner BEGIN/COMMIT in these files caused the outer
transaction to commit early, leaving applyMigration trying to insert
into schema_version on an idle connection:
  pq: unexpected transaction status idle

Affected: 0012_guild_invites, 0014_return_guilds, 0015_tournament.
2026-03-23 11:59:57 +01:00
Houmgaor
dbbfb927f8 feat(guild): separate scout invitations into guild_invites table
Scout invitations were stored in guild_applications with type 'invited',
forcing the scout list response to use charID as the invitation ID — a
known hack that made CancelGuildScout semantically incorrect.

Introduce a dedicated guild_invites table (migration 0012) with a serial
PK. The scout list now returns real invite IDs and actual InvitedAt
timestamps. CancelGuildScout cancels by PK. AcceptInvite and DeclineInvite
operate on guild_invites while player-applied applications remain in
guild_applications unchanged.
2026-03-21 17:59:25 +01:00