account_devices as its own migration #6

Merged
paulhitt merged 1 commits from fix/account-devices-as-its-own-migration into main 2026-09-03 11:28:03 +00:00
paulhitt commented 2026-09-03 11:27:51 +00:00 (Migrated from gitlab.com)

The table went into 010_accounts.sql, which Fluent has already recorded as
applied. So it created itself perfectly on a fresh database and did nothing
at all on production — the deploy reported success and the table was not
there.

The warning for this is written on AddRateLimitCounters, in this same file,
because the identities table was nearly lost to it: "A NEW migration, not an
edit to InstallAccountsSchema. Fluent records what it has run and never runs
it twice, so appending this DDL to an applied migration would work perfectly
on a fresh database and silently do nothing on the deployed one." I read that
comment while writing the code that ignored it.

The baseline goes back to frozen, and the table lives in SQL/040 behind
AddAccountDevices, the way identities and rate limits do.

⚠️ No client sends a device id yet, so nothing was broken by the gap — the
INSERT is only reached when one is supplied. It would have broken sign-in for
the first client that did, which is a worse place to find it.

42 tests.

The table went into 010_accounts.sql, which Fluent has already recorded as applied. So it created itself perfectly on a fresh database and did nothing at all on production — the deploy reported success and the table was not there. The warning for this is written on AddRateLimitCounters, in this same file, because the identities table was nearly lost to it: "A NEW migration, not an edit to InstallAccountsSchema. Fluent records what it has run and never runs it twice, so appending this DDL to an applied migration would work perfectly on a fresh database and silently do nothing on the deployed one." I read that comment while writing the code that ignored it. The baseline goes back to frozen, and the table lives in SQL/040 behind AddAccountDevices, the way identities and rate limits do. ⚠️ No client sends a device id yet, so nothing was broken by the gap — the INSERT is only reached when one is supplied. It would have broken sign-in for the first client that did, which is a worse place to find it. 42 tests.
paulhitt commented 2026-09-03 11:27:51 +00:00 (Migrated from gitlab.com)

assigned to @paulhitt

assigned to @paulhitt
paulhitt commented 2026-09-03 11:28:03 +00:00 (Migrated from gitlab.com)

mentioned in commit 022af50f2b

mentioned in commit 022af50f2b32aa3a06e69c9efdaf51b65e53e9ac
paulhitt (Migrated from gitlab.com) merged commit 022af50f2b into main 2026-09-03 11:28:04 +00:00
This repo is archived. You cannot comment on pull requests.
No Reviewers
No labels
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: extant2000/flamenet-files#6