nxtgauge-backend-rust/crates
Ashwin Kumar Sivakumar 8e4d64d33b fix(db): correct ai_credit_packages pricing (paise not rupees), add missing ai_credit_orders table
Discovered while wiring up role-scoped AI credit packages: the active
seed migration (20260615060600) stored price_inr as 99/349/999/2499 -
values that read like whole rupees, but every consumer (PayU's
paise_to_rupee_string, matching pricing_packages' existing paise
convention) treats price_inr as paise, meaning a real purchase would
have charged ~1% of the intended price.

The actual fix already existed as 20260705110000_ai_credit_packages
.up.sql.skip (correct paise values + the ai_credit_orders table
create_order inserts into) but got disabled in the same bulk skip
pass as everything else this session has been un-tangling - its
CREATE TABLE ai_credit_packages (no IF NOT EXISTS) hit 'relation
already exists' since 20260615060600 had already created it, aborting
before ai_credit_orders was ever created.

Net effect before this fix: buying AI credits was completely broken
(create_order would 500 - no ai_credit_orders table to insert into).
Confirmed zero rows anywhere in ai_credit_orders (the table simply
didn't exist) - nothing to reconcile, this is a pre-launch fix.

New migration (not resurrecting the old .skip file, to keep a clean
linear history matching this session's other fixes): UPDATE the 4
known-wrong rows by name to their correct paise values, CREATE TABLE
IF NOT EXISTS ai_credit_orders. Applied to both nxtgauge_test and
prod; verified.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-14 01:38:59 +05:30
..
auth fix payments runtime and jwt backend 2026-06-09 22:52:30 +02:00
cache Fix security audit findings: admin authz, captcha, secret leak, CORS 2026-07-23 17:31:48 +05:30
contracts fix: security, wallet holds, printpdf upgrade 2026-08-12 13:38:17 +02:00
db fix(db): correct ai_credit_packages pricing (paise not rupees), add missing ai_credit_orders table 2026-08-14 01:38:59 +05:30
db-migrate
email
invoice feat: generate a GST invoice automatically after a successful Tracecoin/PayU purchase 2026-07-21 03:02:47 +05:30
storage Add presigned document URLs to stop leaking permanent Backblaze links 2026-07-27 18:07:15 +05:30
wallet feat: profile photo upload, PDF resume generation, AI auto-apply, schema fixes 2026-07-02 13:31:06 +02:00