- Profile photo upload: POST /api/profile/photo for all roles, stores via B2 storage - PDF resume: auto-generated from job seeker portfolio on every profile save (printpdf) - Company applications: enriched with applicant name, avatar, headline, skills, education - AI auto-apply cron: rewrote run_auto_apply with correct schema (job_seeker_profiles, cover_note, ai_auto_apply_settings, ai_auto_apply_logs, credit deduction) - Schema fix: job_seeker_profiles table name (was incorrectly 'job_seekers' in two places) - Migration: add resume_url column to job_seeker_profiles - Migrations: PayU rename, tracecoin hardening, lead reserve linkage, invoice/wallet crates - PayU integration: ai_credits, packages, admin payment handlers - Wallet and invoice crates added Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
14 lines
959 B
SQL
14 lines
959 B
SQL
-- ──────────────────────────────────────────────────────────────────────────
|
|
-- Lead request reservation linkage
|
|
-- ──────────────────────────────────────────────────────────────────────────
|
|
-- Store the tracecoin_ledger row id that holds the RESERVE entry for each
|
|
-- lead_request, so we can release/confirm the exact same ledger row
|
|
-- when the request is accepted, rejected, cancelled, or expired.
|
|
|
|
ALTER TABLE lead_requests
|
|
ADD COLUMN IF NOT EXISTS reserve_ledger_id UUID
|
|
REFERENCES tracecoin_ledger(id);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_lead_requests_reserve_ledger_id
|
|
ON lead_requests(reserve_ledger_id)
|
|
WHERE reserve_ledger_id IS NOT NULL;
|