From 31fdf527228563eef334fec1aa81e115cb0865ae Mon Sep 17 00:00:00 2001 From: Devin Zuczek Date: Tue, 30 Jun 2026 16:11:40 -0400 Subject: [PATCH] fix migrate issue --- README.md | 4 ++++ packages/tools/bin/run-wrangler-migrate | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 64e111a..d77ca33 100644 --- a/README.md +++ b/README.md @@ -203,6 +203,10 @@ just migrate -F rooms # or scope to one worker just migrate -- --local # target the local dev db instead of remote ``` +This runs non-interactively (it sets `CI`), so wrangler's "database may be +unavailable during the migration" confirmation is auto-accepted — turbo can't +forward your answer to the task anyway. A backup is still captured. + _KV — two namespaces_ (`RECFLARE_MATCH_PRESENCE` for `match`/`auth`, `RECFLARE_PLAYER_SETTINGS` for `playersettings`): diff --git a/packages/tools/bin/run-wrangler-migrate b/packages/tools/bin/run-wrangler-migrate index 6749729..5bef482 100755 --- a/packages/tools/bin/run-wrangler-migrate +++ b/packages/tools/bin/run-wrangler-migrate @@ -30,6 +30,12 @@ for arg in "$@"; do esac done +# wrangler's "your database may be unavailable during the migration, continue?" +# confirmation can't be answered when this runs under turbo (it doesn't forward +# stdin to the task), so run non-interactively — wrangler skips the prompt and +# proceeds, still capturing a backup. An already-set CI value (real CI) wins. +export CI=${CI:-true} + if [ "$LOCAL" -eq 1 ]; then # Local db keys off the "local" placeholder, so the committed config is fine. exec wrangler d1 migrations apply "$DB_NAME" "$@"