Fixes and improvements

This commit is contained in:
imengying committed 2026-08-12 09:10:31 +08:00
1 parent 44a0ada698
commit 36f6e1dcbb
2 files changed
+23 -6

No files matched your search

+10 -4
View File
@@ -69,7 +69,13 @@ fi
prepare_runtime_secrets
# Workers Builds provisions the binding declared in wrangler.toml before running
# the deploy command, so migrations can target the binding directly.
bunx wrangler d1 migrations apply DB --remote
deploy_worker
# Workers Builds provisions this binding before running the deploy command. A
# direct first deployment does not, so provision the Worker first when the
# default database is not present. The first branch uploads only once.
if bunx wrangler d1 info nodeflare --json >/dev/null 2>&1; then
bunx wrangler d1 migrations apply DB --remote
deploy_worker
else
deploy_worker
bunx wrangler d1 migrations apply DB --remote
fi