Repository navigation
Nothing applies a migration, so a schema change is an outage #277
Description
Background
This repo commits its migrations — there are nine under prisma/migrations/ —
and nothing runs them. build is tsc, start is node dist/index.js.
So a PR that adds a column and its migration still leaves the column missing in
production until somebody runs it by hand. On the offramp that is worse than a
plain failure: createOfframpOrder calls Linq before writing our row, so a
failed insert leaves a real provider payout order with no record of ours.
This nearly happened: PR #210 added requestHash with no migration at all.
What to build
- Apply migrations as part of starting or deploying, or fail loudly when the
database is behind what the code expects. Either is defensible; silently
running against an older schema is not. - Be careful with
prisma migrate deployhere: past use ofprisma db push
means_prisma_migrationsmay not record migrations that are in fact
applied, so a naive deploy may try to recreate existing objects. Investigate
the real state before choosing, and write down what you found.
Acceptance criteria
- A schema newer than the database is detected, not ignored
- The chosen mechanism is documented, including why
- The
_prisma_migrationsstate is checked and the finding recorded - Nothing drops or rewrites an existing table
Drips Wave · Complexity: Intermediate · 150 points
Repo: Miracle656/wraith (Express + TypeScript + Prisma). Run npm test
(jest) and npm run typecheck. Both must pass.
This service moves real money, and Linq has no sandbox. Every /ngn and
/offramp route is mainnet-gated at the router for that reason. Test against
the fake provider in src/__tests__, never against Linq. A single careless
integration test spends somebody's naira.
The provider rate limit is shared and real. All Veil users share one Linq
key. Four manual probes of /ngn/onramp/rate returned 429 rate_limited
during a review. Do not poll the live provider while developing.
A NIN is personal data under Nigeria's NDPA. It must never be stored,
logged, or placed in a test fixture. The existing KYC fixtures contain error
codes and messages only — keep it that way.
Metrics labels must be bounded. Label by things drawn from a finite set:
rail, route, outcome, network, provider error code. Never by an order id, a
customer reference, an amount, a URL or a raw provider message. An unbounded
label makes /metrics grow until it cannot be scraped.
A schema change needs a migration. This repo commits migrations under
prisma/migrations/, and neither build nor start applies one. A
schema.prisma change merged without a migration file means the column never
exists in production. After changing the schema run npx prisma generate
before typecheck, or you will chase errors that are not real.
Never elide an address, a contract id or a key in code, comments or test
fixtures. A previous batch shortened a contract id in an issue text and five
contributors invented their own to fill the gap.
Required: Before submitting, join the contributor Telegram so your work can be tracked and counted toward the Stellar Wave: https://t.me/+fxHXq8f1SwlkZDBk
Activity
Maxl500 commentedon Oct 21, 2026
@Maxl500 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Maxl500 to this issue.
Fabluchy commentedon Oct 21, 2026
@Fabluchy has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Fabluchy to this issue.
waledev1 commentedon Oct 21, 2026
@waledev1 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @waledev1 to this issue.
drips-wave commentedon Oct 21, 2026
Congratulations, @Fabluchy! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.
🧑💻 @Fabluchy: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.
Warning
When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.
🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.
🌊 Happy Wave 🌊
fix(boot): detect schema drift and audit migration history at startup (…
Merge PR #326 #327 #330 #333 #303: strict network resolution, one err…
drips-wave commentedon Oct 22, 2026
This issue has been completed by @Fabluchy as part of the Stellar Wave Program's 10th Wave 🥳
😎 @Fabluchy: You earned 150 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.
🧑💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.