TransactionsProLesson 32 of 45, about 8 min
- 1
- 2
- 3
- 4
- 5
- 6
- 7
The app: Ledger, a database client
Ledgerharbor · productionharbor_readonly
Kestrel Labs, to Harbor support, 09:31
We upgraded to Business at 09:14 and the card was charged $79.00. Harbor still says we’re on Pro.
charges where team_id = 2, newest first
idamount_centscreated_at
ch_88122026-12-04 09:14:02
ch_879029002026-11-04 08:00:11
subscriptions where team_id = 2
team_idplan_idstatus
2active
The statements Ledger sends, and what the database answers
api/teams/upgrade.js the upgrade, as your agent wrote itPOST
1// POST /v1/teams/:id/upgrade: two statements2await db.query(3 "insert into charges (team_id, amount_cents) values ($1, $2)",4 [teamId, 7900],5);6await db.query(7 "update subscriptions set plan_id = $1 where team_id = $2",8 ["business", teamId],9);10res.json({ plan: "business" });
Server log 09:14, Kestrel’s upgrade500
09:14:02 insert into charges … INSERT 0 1
09:14:04 update subscriptions … waiting for a lock
09:14:06 ERROR: canceling statement due to lock timeout
09:14:06 POST /v1/teams/2/upgrade 500
The MagisterLeft: Ledger, connected read-only to Harbor. Kestrel Labs upgraded to Business at 09:14 and paid $79. Harbor still says Pro. The upgrade runs two statements: the charge was saved, and the plan change failed. Tap the charge, then the plan that never moved.
Step 1 of 7Find the half-done upgrade
- Tap Kestrel’s $79.00 charge
- Tap the plan that didn’t change
You’re not signed in, so this lesson won’t be saved to your path. Sign in free to keep your XP.