Prepare the database schema
Schema changes are implemented byrunMigrations() in src/lib/db/migrations.ts. The function records applied versions in schema_migrations and uses a time-limited database lock. No production startup caller or dedicated package migration command is established in this repository.
To prepare a configured database explicitly, create a temporary script in the repository root:
tsx dependency:
schema_migrations and the process logs before serving traffic that needs new tables. Migration functions are not a documented automatic rollback mechanism.
Distinguish the two migrations
The internal publication runner is
/api/internal/migration, protected by CRON_SECRET or MIGRATION_CRON_SECRET. A route existing in the code does not prove that an external scheduler invokes it. See migration limits before treating every account as migrated.
Diagnose a stale README
- Open the configured slug’s dark and light SVGs on the
gitasciibranch. Confirm the JSON and latest commit match the intended design. - Inspect the workflow on the repository default branch and its latest Actions log. Check permissions, schedule, interval skips, and stale-branch outcomes.
- Open the raw SVG URL directly. If the repository file is correct but the README is older, separate raw GitHub and image-proxy caching from a failed render.
- Dispatch the workflow manually when a refresh is needed. Manual dispatch bypasses the scheduled interval guard; it does not promise that unchanged SVGs will create another commit.
Diagnose missing Pro signals
Check the current account entitlement, database connectivity, and Action OIDC verification. Publication telemetry is best effort, so an absent report does not by itself prove a failed SVG commit. Badge request counts and Action health reports have separate sources. A health-badge fallback can look operational despite a failed lookup; inspect stored reports and logs instead. For payment activation, inspect the signed Stripe webhook’s delivery and persisted entitlement record. The checkout redirect is not an activation receipt. Widget-error alert records currently do not prove email delivery.Backup and recovery
Back up the database with the database provider’s supported tooling, and keep repository history available for published artifacts. The repository does not include an automated backup scheduler, tested disaster-recovery procedure, or universal restore command. For a damaged layout, recover its JSON from Git history or a local export, import it into the editor, review it, and publish. To restore only the public image, recover the SVG files ongitascii through Git; a later Action run can replace them from the current JSON. Restore configuration as well if that replacement would be unwanted.
Database restoration recovers only records included in that backup. GitHub files, installation permissions, Redis state, and external billing state must be reconciled separately. Do not assume an old Redis entitlement should override PostgreSQL: configured database-backed entitlement lookup is authoritative.
Sources: schema migrations, backfill utility, and publication migration route.