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 77f135f0e2 fix(scripts): document the DATABASE_URL-prefixed invocation, make SQLite an explicit opt-in
apply-onboarding-pipeline.ts documented its own command with no `DATABASE_URL=`
prefix -- the only hardened data script missing it. Followed literally on the
production host it resolves to SQLite, not the real database. Header corrected to
match its siblings.

The deeper problem is that landing on SQLite was a DEFAULT, not a decision: with no
DATABASE_URL, resolution quietly returned '' and the run was only saved by the
"never CREATE a database" guard -- which passes as soon as any stale ./data/hq.db
exists under the operator shell's cwd. requireDbUrlForEnv now refuses a SQLite
outcome unless it was explicitly asked for (HQ_DB_TARGET=sqlite, a --sqlite flag,
or HQ_DATA_DIR=:memory:), and the error names both escape hatches. The create guard
is unchanged and still applies after the opt-in. server.ts calls resolveDbUrl
directly, so first-boot DB creation is untouched.

All five maintenance-script headers now state the SQLite opt-in.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 day ago
..
apply-ltd-numbers.ts fix(scripts): document the DATABASE_URL-prefixed invocation, make SQLite an explicit opt-in 1 day ago
apply-name-fixes.ts fix(scripts): document the DATABASE_URL-prefixed invocation, make SQLite an explicit opt-in 1 day ago
apply-onboarding-pipeline.ts fix(scripts): document the DATABASE_URL-prefixed invocation, make SQLite an explicit opt-in 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 fix(scripts): document the DATABASE_URL-prefixed invocation, make SQLite an explicit opt-in 1 day ago
migrate-onboarding-templates.ts fix(scripts): document the DATABASE_URL-prefixed invocation, make SQLite an explicit opt-in 1 day ago