mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-24 15:45:35 +08:00
* improvement(db): add opt-in read-replica client and harden migration runner * fix(db): detect wrapped lock-timeout errors, jittered retries, direct migration DSN support * fix(db): audit fixes — unparameterized SET, primary reads for authz scoping, shared error helper * fix(db): pin migration session — disable max_lifetime recycling, guard backend pid across retries * fix(db): gate pid session guard to direct migration connections (pooler pids legitimately vary) * improvement(billing): route display-only usage aggregations to the read replica via executor threading * chore(db): drop call-site justification comments * chore(db): tighten doc comments * ci(migrations): map optional direct-connection DSN secrets * fix(data-drains): add stability window to time cursors so late-visible rows are never skipped * fix(billing): resolve pagination cursor on primary; replica for member ledger display * fix(billing): usage-limits returns cost and limit from one computation
12 lines
588 B
Bash
12 lines
588 B
Bash
# Database connection used by @sim/db scripts (drizzle-kit generate,
|
|
# db:migrate, register-sso-provider, etc.). Must match DATABASE_URL in
|
|
# apps/sim/.env and apps/realtime/.env. Migrations always run against the
|
|
# primary — never set a replica URL here.
|
|
|
|
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/simstudio"
|
|
|
|
# Direct (non-pooled) DSN for db:migrate. Required when DATABASE_URL points at
|
|
# a transaction-pooling PgBouncer: session advisory locks and session SETs are
|
|
# unsupported through transaction pooling. Falls back to DATABASE_URL.
|
|
# MIGRATION_DATABASE_URL=""
|