mirror of
https://github.com/djdevin/recflare.git
synced 2026-09-08 14:41:28 -07:00
fix migrate issue
This commit is contained in:
@@ -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`):
|
||||||
|
|
||||||
|
|||||||
@@ -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" "$@"
|
||||||
|
|||||||
Reference in New Issue
Block a user