nxtgauge-backend-rust/crates
Ashwin Kumar Sivakumar c5b3a9583d
All checks were successful
build-and-release / build (cron) (push) Successful in 1m2s
build-and-release / build (catering-services) (push) Successful in 1m36s
build-and-release / build (companies) (push) Successful in 2m11s
build-and-release / build (employees) (push) Successful in 2m25s
build-and-release / build (developers) (push) Successful in 2m47s
build-and-release / build (customers) (push) Successful in 3m5s
build-and-release / build (gateway) (push) Successful in 1m46s
build-and-release / build (fitness-trainers) (push) Successful in 2m44s
build-and-release / build (graphic-designers) (push) Successful in 2m0s
build-and-release / build (jobs) (push) Successful in 1m52s
build-and-release / build (makeup-artists) (push) Successful in 1m40s
build-and-release / build (job-seekers) (push) Successful in 3m1s
build-and-release / build (social-media-managers) (push) Successful in 1m54s
build-and-release / build (payments) (push) Successful in 2m57s
build-and-release / build (photographers) (push) Successful in 2m57s
build-and-release / build (tutors) (push) Successful in 2m43s
backend-integration-tests / ai-credits (push) Successful in 1m9s
build-and-release / build (ugc-content-creators) (push) Successful in 3m12s
build-and-release / build-db-migrate (push) Successful in 2m23s
build-and-release / build (video-editors) (push) Successful in 2m46s
build-and-release / build (users) (push) Successful in 4m56s
fix(users): registration was broken -- users.first_name/last_name never existed
Root cause, traced via git history: commit a3076ed ("update DB schema -
split users.first_name, users.last_name, roles split", 2026-04-15)
rewrote ~35 files across the codebase (UserRepository, and read sites
throughout apps/users, apps/companies, apps/job_seekers,
apps/customers, crates/contracts) to use users.first_name/last_name
instead of users.full_name -- but never added the migration to
actually create those columns. UserRepository::create is the only
INSERT into users and the live registration path; it's been trying to
insert into nonexistent columns ever since.

Confirmed this independently by spinning up Postgres locally, applying
every migration in crates/db/migrations (the exact set Dockerfile.migrate
bakes into the deployed db-migrate image, so this isn't a
theoretical-config-drift argument -- it's what's actually shipped) with
DROP_EXISTING_TABLES unset against a clean DB, and running the real
UserRepository::create call: `column "first_name" of relation "users"
does not exist`.

Finishes what that commit should have done: adds first_name/last_name
to users, backfilled from the pre-existing full_name (naive split on
first space). Does NOT drop full_name -- apps/payments (invoice/billing
legal names) and job_seeker_profiles still correctly read it, so
UserRepository::create now also derives and writes full_name from
first_name/last_name, keeping both representations correct for every
user going forward instead of only whichever one a given caller reads.

Verified against a real local Postgres, not just compiled:
- All 40 migrations in this directory apply cleanly in sequence, and
  a second and third run are fully idempotent (this surfaced three
  more of my own earlier migrations this session -- job_applications
  unique constraint, company_profiles non-negative checks, lead_requests
  FKs -- that used bare `ADD CONSTRAINT` with no IF NOT EXISTS guard;
  since this repo's db-migrate has no migration-tracking table and
  re-executes every .up.sql on every deploy, those would have errored
  on the second deploy and silently blocked every migration after them
  alphabetically, including all of today's other fixes. Fixed to match
  the DO $$ ... pg_constraint IF NOT EXISTS pattern already used
  elsewhere in this migrations directory.)
- A standalone harness actually calling UserRepository::create against
  that live DB confirms registration succeeds and full_name ends up
  correctly populated.
- The backfill was verified against simulated legacy rows (full_name
  only, both single- and multi-word names).
- cargo test -p db (real integration tests, not just compile-checked --
  requires TEST_DATABASE_URL, which is why these hadn't run all session)
  passes in full: 8 tests including concurrent_reservations_cannot_
  overdraw_wallet and expired_hold_is_swept_and_credits_return_to_available.
2026-08-18 01:58:23 +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 feat(marketplace): urgent/featured leads for customers, correct request cap 2026-08-18 01:34:24 +05:30
db fix(users): registration was broken -- users.first_name/last_name never existed 2026-08-18 01:58:23 +05:30
db-migrate feat(db): update service handlers and models for new schema 2026-04-13 00:29:44 +02:00
email Update backend services: catering_services, companies, developers, gateway, job_seekers, photographers, social_media_managers, tutors, ugc_content_creators, users; update cache (otp, token), contracts (profession_shared, profession_state), db (job_seeker, verification), email; add revision-requested email template; update init-db.sql and start-services.sh 2026-05-08 15:34:29 +02:00
invoice fix: wire up dead admin router, IDOR on submit_requirement, dead code cleanup 2026-08-18 01:44:10 +05:30
storage Add presigned document URLs to stop leaking permanent Backblaze links 2026-07-27 18:07:15 +05:30
wallet fix(wallet): fund-leak on lead rejection, broken expiry refund, dead admin_adjust 2026-08-18 00:51:19 +05:30