You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sims-hq/apps/hq/scripts
Thomas Joise 31335cd4ad fix(deploy): one shared DB-engine resolver so scripts can't silently target a throwaway SQLite file (FIX A)
apply-onboarding-pipeline.ts and migrate-onboarding-templates.ts resolved the
engine as `DATABASE_URL ?? ''`, diverging from server.ts's production
fallback. On the prod box (DATABASE_URL unset) each script opened a brand-new
empty SQLite file, "succeeded" against it, and Postgres was never touched.

resolveDbUrl()/requireDbUrlForEnv()/pgTargetDescription() now live in
db-pg.ts as the one place this is decided; server.ts and both scripts call
it. The scripts additionally hard-fail (never fall back to SQLite) when
NODE_ENV=production resolves nothing, log their target engine before doing
any work, and close the DB handle in a finally.

Also lands client_module.created_at (nullable, additive) — schema groundwork
FIX D uses to measure a no-tick project's age from its real creation date
instead of treating a missing done_on as infinitely old.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 day ago
..
apply-ltd-numbers.ts chore(d35): script to append directory-sourced LTD numbers to client names 2 days ago
apply-name-fixes.ts chore(d35): script to apply approved client-name corrections (audited) 2 days ago
apply-onboarding-pipeline.ts fix(deploy): one shared DB-engine resolver so scripts can't silently target a throwaway SQLite file (FIX A) 1 day ago
backup-hq.sh docs(hq): go-live runbook, env template and S3 backup script 1 week ago
demo-seed.ts chore: remove all 'Tecnostac' references — everything is SiMS 2 days ago
gmail-connect.ts feat(db): D19 P1-P3 — async DB interface, dual engines, Postgres adapter 4 days ago
import-apex-full.ts feat(d20): importer v2 rework from the 46-agent real-data audit 4 days ago
import-employees.ts feat(d34): import employee master + invited/pending-login flag 2 days ago
migrate-onboarding-templates.ts fix(deploy): one shared DB-engine resolver so scripts can't silently target a throwaway SQLite file (FIX A) 1 day ago