Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate D1 in production adjustment #246

Open
ninjasitm opened this issue Mar 17, 2024 · 0 comments
Open

Migrate D1 in production adjustment #246

ninjasitm opened this issue Mar 17, 2024 · 0 comments

Comments

@ninjasitm
Copy link

Hello,

Just came across this issue trying to update my production schema.

In package.json the up:prod command runs: wrangler d1 migrations apply sonicjs/

This will not, as far as I can tell update your production database, only the local DB.

According to https://developers.cloudflare.com/workers/wrangler/commands/#migrations-apply there is a --remote switch that is needed to update the production/remote D1 DB.

Recommendation

Update the up:prod command to use:

wrangler d1 migrations apply sonicjs --remote

Change the up command to, as --local is true by default:

wrangler d1 migrations apply sonicjs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant