fix(db): pricing_packages.price_inr was seeded as rupees, treated as paise
All checks were successful
build-and-release / build (companies) (push) Successful in 2m4s
build-and-release / build (customers) (push) Successful in 2m7s
build-and-release / build (employees) (push) Successful in 2m14s
build-and-release / build (catering-services) (push) Successful in 2m34s
build-and-release / build (cron) (push) Successful in 2m40s
build-and-release / build (developers) (push) Successful in 3m16s
build-and-release / build (gateway) (push) Successful in 1m12s
build-and-release / build (graphic-designers) (push) Successful in 1m44s
build-and-release / build (jobs) (push) Successful in 1m52s
build-and-release / build (fitness-trainers) (push) Successful in 2m38s
build-and-release / build (job-seekers) (push) Successful in 2m25s
build-and-release / build (photographers) (push) Successful in 1m55s
build-and-release / build (makeup-artists) (push) Successful in 2m43s
build-and-release / build (social-media-managers) (push) Successful in 2m56s
build-and-release / build (tutors) (push) Successful in 2m49s
build-and-release / build (payments) (push) Successful in 4m44s
backend-integration-tests / ai-credits (push) Successful in 1m3s
build-and-release / build (video-editors) (push) Successful in 2m55s
build-and-release / build (ugc-content-creators) (push) Successful in 4m26s
build-and-release / build-db-migrate (push) Successful in 3m6s
build-and-release / build (users) (push) Successful in 8m29s

58 of 59 rows were inserted with plain rupee-looking values (499, 999,
1999, ...) but every consumer (apps/payments/src/main.rs) treats
price_inr as paise, so PayU would have charged 1/100th of the intended
price. Confirmed zero rows in payments/orders — pre-launch data fix, not
a refund situation.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Ashwin Kumar Sivakumar 2026-08-17 19:23:56 +05:30
parent c486f60775
commit 4ee593f407
2 changed files with 24 additions and 0 deletions

View file

@ -0,0 +1,5 @@
BEGIN;
UPDATE pricing_packages SET price_inr = price_inr / 100 WHERE price_inr >= 100 AND price_inr < 1000000 AND price_inr != 25000;
COMMIT;

View file

@ -0,0 +1,19 @@
-- pricing_packages.price_inr is treated as PAISE by every consumer (see
-- apps/payments/src/main.rs's paise_to_rupee_string call, and the comment
-- on that column at apps/payments/src/main.rs:196) but 58 of the 59 rows
-- (all but the JOB_SEEKER "Starter Pack" seeded correctly at 25000 = ₹250
-- in 20260721070000_seed_pricing_packages.up.sql) were inserted with plain
-- rupee-looking values (499, 999, 1999, 4999, 9999, ...). PayU would divide
-- by 100 and charge 1/100th of the intended price, e.g. a "₹999 Growth"
-- package would actually charge ₹9.99.
--
-- Threshold price_inr < 10000 catches exactly the mis-seeded rows and
-- leaves the correctly-seeded 25000 row untouched. Confirmed no purchases
-- have gone through pricing_packages yet (this is pre-launch), so this is
-- a data-fix, not a refund situation.
BEGIN;
UPDATE pricing_packages SET price_inr = price_inr * 100 WHERE price_inr < 10000;
COMMIT;