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

Postgres CLI tools shouldn't be required to run lucky dev #733

Closed
robacarp opened this issue Feb 28, 2022 · 3 comments
Closed

Postgres CLI tools shouldn't be required to run lucky dev #733

robacarp opened this issue Feb 28, 2022 · 3 comments

Comments

@robacarp
Copy link
Contributor

There are a bunch of situations which a developer might not otherwise need or want postgres cli tools to be installed -- can this check be removed?

@jwoertink
Copy link
Member

I don't think so... Aside from running queries, everything else uses the postgres CLI. lucky db.create for example. I know most of this can be done from within SQL (i.e. CREATE DATABASE, etc...), but we'd either have to do a ton of checks, or move all of the db related tasks. Like, can you do pg_dump from within SQL? If not, then lucky db.dump would have to be optionally disabled, or fail fast from some sort of check.

I'm not opposed to removing it if there's a clean way we can, but at first thought, it might be really difficult 🤔

@robacarp
Copy link
Contributor Author

I don't think I even knew about lucky db.dump. All of the commands can certainly be replicated within a query context as long as your connecting user has privileges to do the action, but it's not always straightforward. For example, if you connect to postgres with an explicit database name, but you do so in order to create that database, that connection will fail.

@jwoertink
Copy link
Member

This was resolved with luckyframework/avram#942

You should now be able to generate a Lucky app and run lucky dev without having postgres client tools installed.

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

2 participants