Skip to content
This repository has been archived by the owner on Feb 23, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant