Rescale a live economy in one migration
Moving the unit rate means moving every stored figure with it, in one operation, guarded so a resumed run cannot do it twice.
15 entries
Moving the unit rate means moving every stored figure with it, in one operation, guarded so a resumed run cannot do it twice.
A low balance, a daily cap and a rate limit are normal faucet flow. Wrapping every call in try/catch to branch on them reads worse than returning a result array.
Prefix-based grouping dumps most keys into an alphabetical wall. A catalogue with tabs, help text and a search — plus a test that fails the build when a migration adds an uncatalogued key.
Code that queries a column the database does not have fails with an unstyled fatal. A guard that names the missing migration turns that into a two-minute fix.
Operators run SQL by hand. If the runner only trusts its own table, it will later insist fifteen applied migrations are pending and lock them out.
Ad networks and faucet scripts validate against the common shape, which is /api?api=TOKEN&url=. A rewrite gives you that without breaking existing integrations.
Every provider shortens by API: you POST or GET their endpoint with your token and a destination, and they return JSON containing the short URL. Gluing a destination onto a base URL works with none of them.
Rate limited, length capped, link stripped, moderatable, and cheap to poll. The five constraints that keep a chat box usable.
Every manual adjustment writes a ledger row and an audit row, inside one transaction. An admin panel that edits a balance directly is how books stop balancing.
A non-blocking file lock in three lines, and why a database flag is the wrong tool for this particular job.
A status column, one check in the session guard, and a shadow-banned tier that keeps working while earning nothing.
Send N, receive M, and keep the difference as the house margin. The one transaction that moves credits between two members without leaking any.
Numbered SQL files, a table of what has run, and a splitter that does not break on semicolons inside strings.
Faucet software already knows how to talk to shortlink providers. Match the contract they expect and operators can point their existing config at you without writing anything.
Everything an operator might want to change belongs in the database, not in code. This is the small layer that makes that painless.