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

chore: cleanup planetscale db branches? #342

Open
hi-ogawa opened this issue May 1, 2023 · 3 comments
Open

chore: cleanup planetscale db branches? #342

hi-ogawa opened this issue May 1, 2023 · 3 comments

Comments

@hi-ogawa
Copy link
Owner

hi-ogawa commented May 1, 2023

For some legacy reason, current branches look like this:

image

It looks like now we can disable "safe migration" (https://planetscale.com/blog/update-to-our-workflow-safe-migrations), which means I can finally remove main--us-east-1 and then recreate a new development branch for staging?

@hi-ogawa

This comment was marked as outdated.

@hi-ogawa
Copy link
Owner Author

hi-ogawa commented May 5, 2023

Well, we still cannot delete main--us-east-1 since that's the base branch of main...
Probably it'll re-creating a whole main database after deleting everything, which is not probably what we want to do right now.

@hi-ogawa
Copy link
Owner Author

hi-ogawa commented May 5, 2023

(probably we should test this routine for staging db first)

todo (production)

  • dump ytsub_production/main
pscale org switch hiro18181-ytsub
pscale database dump ytsub_production main
  • delete all branches on planetscale
  • create ytsub_production/main
  • restore dump
pscale database restore-dump ytsub_production main --dir ???
  • update credentials
    • .env.production (local)
    • vercel deployement

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