fix migrate issue

This commit is contained in:
Devin Zuczek
2026-06-30 16:11:40 -04:00
parent c1489ea683
commit 31fdf52722
2 changed files with 10 additions and 0 deletions
+4
View File
@@ -203,6 +203,10 @@ just migrate -F rooms # or scope to one worker
just migrate -- --local # target the local dev db instead of remote 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`, _KV — two namespaces_ (`RECFLARE_MATCH_PRESENCE` for `match`/`auth`,
`RECFLARE_PLAYER_SETTINGS` for `playersettings`): `RECFLARE_PLAYER_SETTINGS` for `playersettings`):
+6
View File
@@ -30,6 +30,12 @@ for arg in "$@"; do
esac esac
done 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 if [ "$LOCAL" -eq 1 ]; then
# Local db keys off the "local" placeholder, so the committed config is fine. # Local db keys off the "local" placeholder, so the committed config is fine.
exec wrangler d1 migrations apply "$DB_NAME" "$@" exec wrangler d1 migrations apply "$DB_NAME" "$@"