D1: recreate the production database with a US primary
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
- #562 par @tombeckenham — fermée sans fusion
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 25/100
- Type d'issue
- Fonctionnalité
- Clarté
- Clairement spécifiée
- Activité
- À l'abandon
- Stack technique
- typescript
Piste de recherche
Read wrangler.jsonc and the deployment pipeline, then check whether #553 is restored before attempting the cutover. Pause cron writes, export modelschemas with wrangler d1 export, import into modelschemas-us, and spot-check the listed tables. Deploy the config change, restore crons, verify GET /v1/status and one sync request, then retain the old database for a week.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
D1 fixes a database's primary location when the database is created, and it can't be changed later. Production should have a US primary. Recreate the database in the same Cloudflare account with a location hint and copy the data across. Users, API keys, subscriptions and history are all kept.
Steps
-
wrangler d1 info modelschemasto record the current location. →running_in_region: OC, 1.01 GB, 19 tables (2026-11-04). -
wrangler d1 create modelschemas-us --location enam→21cbfe2e-5a9d-41a8-929e-74089a08230b, region ENAM.enamkeeps the primary beside theUS_EGRESSDurable Object the cron writers fetch through. - Pause the crons so no writes land during the copy (deploy with an empty
triggers.crons, or disable them in the dashboard). Writes only come from the crons, plus auth and subscription calls, which are rare. -
wrangler d1 export modelschemas --remote --output prod.sql, thenwrangler d1 execute modelschemas-us --remote --file prod.sql. - Spot-check row counts per table (
models,schema_versions,changes,subscriptions, better-auth tables). - Point
d1_databases[0].database_idinwrangler.jsoncat the new database. Keepdatabase_namein step withdeploy:ci, which runs migrations by database name. (PR on branch554-d1-recreate-the-production-database-with-a-us-primary; merge only after the cutover deploy.) - Deploy, restore the crons, check
GET /v1/status, run onePOST /v1/admin/sync/openrouter. - Keep the old database for a week, then delete it.
Needs the deploy pipeline back first (#553), or a manual bun run deploy.
Don't reseed instead of copying. The seed doesn't recreate auth users, API keys, agent registrations, webhook subscriptions or checkpoints, or the changes history that /v1/changes cursors point into.
- Langage dominant
- TypeScript
- Étoiles
- 0
- Forks
- 1
- Merge moyen
- 5 h 40 min
- PR mergées (30 j)
- 193
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de TanStack/schemas
-
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 30/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 3/5 1-2 jours Accessibilité débutants 45/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 30/100
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de TanStack/schemas
Issues similaires
-
[Site] Active section detection should respect scroll-margin-topPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouvertearea/web reproduced type/bug
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
anomalyco/opencode#65384 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
swc-project/swc-ai-issues#1001 ·
-
Add: Da Vinci Asia VietnamOuvertecheck:passed streams:add
Difficulté 1/5 Moins d'une heure Accessibilité débutants 62/100
Les mainteneurs répondent en général sous 1 jour
-
fix(table): CollapseColumn uses wrong caret icon for expandable row togglePeut-être pris @redhat-chai-bot l’a pris aujourd’hui. Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 85/100
patternfly/patternfly-react#12727 ·
Les mainteneurs répondent en général sous 1 jour
-
CLI OAuth login fails behind an authenticating proxy: GET /api/v1/user omits Proxy-AuthorizationOuverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 85/100
lightdash/lightdash#33086 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour