|
All checks were successful
build-and-release / build (cron) (push) Successful in 1m10s
build-and-release / build (catering-services) (push) Successful in 1m36s
build-and-release / build (companies) (push) Successful in 2m1s
build-and-release / build (customers) (push) Successful in 2m18s
build-and-release / build (employees) (push) Successful in 2m37s
build-and-release / build (developers) (push) Successful in 2m40s
build-and-release / build (gateway) (push) Successful in 1m19s
build-and-release / build (graphic-designers) (push) Successful in 1m59s
build-and-release / build (fitness-trainers) (push) Successful in 3m2s
build-and-release / build (jobs) (push) Successful in 1m53s
build-and-release / build (job-seekers) (push) Successful in 2m20s
build-and-release / build (makeup-artists) (push) Successful in 2m42s
build-and-release / build (social-media-managers) (push) Successful in 1m49s
build-and-release / build (payments) (push) Successful in 3m21s
build-and-release / build-db-migrate (push) Successful in 9s
build-and-release / build (photographers) (push) Successful in 2m38s
backend-integration-tests / ai-credits (push) Successful in 47s
build-and-release / build (tutors) (push) Successful in 2m51s
build-and-release / build (ugc-content-creators) (push) Successful in 2m55s
build-and-release / build (video-editors) (push) Successful in 2m43s
build-and-release / build (users) (push) Successful in 4m42s
Following up on the job-expiry 'companies' typo found in the same log
sweep: apps/users/src/ai_subscription.rs (upgrade_plan,
schedule_downgrade, apply_scheduled_downgrades, cancel_subscription,
start_trial, expire_trials, get_subscription_history) and the matching
cron tasks were written entirely against schema that was never
migrated:
- user_ai_subscriptions.downgrade_scheduled_to/is_trial/trial_days/
trial_ends_at don't exist
- ai_subscription_history doesn't exist as a table at all, despite
6 separate INSERT/UPDATE/SELECT call sites against it
Confirmed live: apply_scheduled_downgrades and expire_trials have been
failing on every hourly cron run. Any user hitting upgrade/downgrade/
cancel/trial-start would 500 the same way.
Schema reconstructed from every call site's actual INSERT/UPDATE/SELECT,
not guessed: from_plan_id nullable (LEFT JOIN'd, never NOT NULL in any
insert), to_plan_id NOT NULL (always bound, INNER JOIN'd),
proration_credits/proration_days_remaining default (only upgrade_plan
binds them), created_by nullable (expire_trials never binds it).
Also fixed a real, unrelated bug found in the same cron-log sweep:
apps/cron/src/tasks/jobs.rs's expire_stale_jobs referenced a
nonexistent 'companies' table (real name: company_profiles) -- also
failing every hourly run, meaning LIVE jobs past expiry were never
being flipped to EXPIRED.
Verified against a live Postgres by calling the actual production
functions (not simulated SQL) end-to-end: upgrade with proration +
history, schedule-then-real-cron-applied downgrade, cancellation,
trial-start-then-real-cron-expiry, and the joined history read-back.
All 5 passed.
|
||
|---|---|---|
| .. | ||
| auth | ||
| cache | ||
| contracts | ||
| db | ||
| db-migrate | ||
| invoice | ||
| storage | ||
| wallet | ||