Files
stack/packages/db/drizzle/meta/_journal.json
T
code-infra-01 bd16e3ca0a
ci/woodpecker/pr/ci Pipeline was successful
fix(#1395): accounts.issuer column + credential-only backfill
better-auth >=1.7 (1.7.1 measured on web1; our ^1.5.5 range resolves it
on fresh installs) requires an issuer on every account row: sign-up
writes the synthetic 'local:credential' and sign-in filters accounts on
(providerId='credential' AND issuer=that value). The db schema had no
issuer column, so every fresh next install 500s at signup and 401s every
sign-in while admin-token auth kept working.

- schema: accounts.issuer text, nullable — the 1.5.x line our lockfile
  resolves to does not know the field (1.5 ignores, 1.7 populates; one
  schema serves both)
- migration 0017 (drizzle-kit generated snapshot/ALTER, hand backfill
  folded in): ADD COLUMN issuer text; UPDATE credential rows with NULL
  issuer to 'local:credential'. OAuth/sso rows deliberately left NULL —
  better-auth owns their issuer semantics going forward
- tests: greenfield column assertion (nullable, text); UPGRADE-PATH arm
  replays 0000..0016, seeds one credential + one oauth row without
  issuer, applies 0017, and discriminates: credential backfilled,
  oauth stays NULL
- mutants killed: backfill dropped -> upgrade arm fails; backfill-all ->
  oauth assertion fails

Found by T63 on web1 greenfield; verified there as a dist-patch (prior
art). Root cause, error strings, and the post-fix 200 measured by fred;
independently re-derived here against @better-auth/[email protected]'s schema
exports (issuer exists ONLY on account — user/session/verifications
carry no issuer field).
2026-08-24 17:09:33 -05:00

133 lines
2.7 KiB
JSON

{
"version": "7",
"dialect": "postgresql",
"entries": [
{
"idx": 0,
"version": "7",
"when": 1773368153122,
"tag": "0000_loud_ezekiel_stane",
"breakpoints": true
},
{
"idx": 1,
"version": "7",
"when": 1773602195608,
"tag": "0001_cynical_ultimatum",
"breakpoints": true
},
{
"idx": 2,
"version": "7",
"when": 1773602195609,
"tag": "0001_magical_rattler",
"breakpoints": true
},
{
"idx": 3,
"version": "7",
"when": 1773625181629,
"tag": "0002_nebulous_mimic",
"breakpoints": true
},
{
"idx": 4,
"version": "7",
"when": 1773887085247,
"tag": "0003_p8003_perf_indexes",
"breakpoints": true
},
{
"idx": 5,
"version": "7",
"when": 1774224004898,
"tag": "0004_bumpy_miracleman",
"breakpoints": true
},
{
"idx": 6,
"version": "7",
"when": 1774225763410,
"tag": "0005_minor_champions",
"breakpoints": true
},
{
"idx": 7,
"version": "7",
"when": 1774227064500,
"tag": "0006_swift_shen",
"breakpoints": true
},
{
"idx": 8,
"version": "7",
"when": 1776822435828,
"tag": "0008_smart_lyja",
"breakpoints": true
},
{
"idx": 9,
"version": "7",
"when": 1745280000000,
"tag": "0009_federation_grant_pending",
"breakpoints": true
},
{
"idx": 10,
"version": "7",
"when": 1745366400000,
"tag": "0010_federation_enrollment_tokens",
"breakpoints": true
},
{
"idx": 11,
"version": "7",
"when": 1782310438919,
"tag": "0011_bitter_gateway",
"breakpoints": true
},
{
"idx": 12,
"version": "7",
"when": 1783911983447,
"tag": "0012_interaction_durable_state",
"breakpoints": true
},
{
"idx": 13,
"version": "7",
"when": 1783913232578,
"tag": "0013_interaction_checkpoint_history",
"breakpoints": true
},
{
"idx": 14,
"version": "7",
"when": 1783913398006,
"tag": "0014_interaction_outbox_channel_scope",
"breakpoints": true
},
{
"idx": 15,
"version": "7",
"when": 1783942610000,
"tag": "0015_interaction_checkpoint_payload_digest",
"breakpoints": true
},
{
"idx": 16,
"version": "7",
"when": 1784050648841,
"tag": "0016_salty_morlocks",
"breakpoints": true
},
{
"idx": 17,
"version": "7",
"when": 1787609223282,
"tag": "0017_accounts_issuer",
"breakpoints": true
}
]
}