[Feature Request] project level config
robotkutya opened this issue · 7 comments
We can currently set our default org in ~/.config/planetscale/pscale.yml
however I did not find a way to set your organization on a project (git repo) level.
It would be cool to have a local setting that takes precedence, similar to how e.g. .nvmrc
sets the node version for the directory.
I understand I can use the --org
flag, but that's still easy to mix up when working on multiple projects in multiple orgs.
If you use pscale
inside a Git repository, we already should do this automatically for you. See also:
Lines 100 to 119 in 26c43c9
Is that not working for you?
Nope :(
Maybe I'm missing something obvious, but can you give me a super stupid example how this would look like?
So if I am in the git repo root, where should I put the config exactly with what path?
@robotkutya You can use the pscale
inside the repo to set the default org. So like:
~/project/dir $ pscale org switch <wanted-org>
That will store a .pscale.yml
in the ~/project/dir
. It looks something like this:
org: <wanted-org>
If you then run pscale org show
you'll see the value and where it's stored:
~/project/dir $ pscale org show
<wanted-org> (from file:~/project/dir/.pscale.yml)
An extra sentence in the docs here would be really helpful IMHO.
Would you be willing to open an issue for this on https://github.com/planetscale/docs/issues? So we can track it there as a documentation improvement? Something along the line of "document per project settings for the CLI"?
Would you be willing to open an issue for this on https://github.com/planetscale/docs/issues? So we can track it there as a documentation improvement? Something along the line of "document per project settings for the CLI"?
Thnx! Closing this one in favor of the docs issue.
@dbussink done, thanks!