lucky_cli icon indicating copy to clipboard operation
lucky_cli copied to clipboard

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

Open robacarp opened this issue 3 years ago • 2 comments

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?

robacarp avatar Feb 28 '22 20:02 robacarp

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 :thinking:

jwoertink avatar Feb 28 '22 20:02 jwoertink

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.

robacarp avatar Feb 28 '22 21:02 robacarp

This was resolved with https://github.com/luckyframework/avram/pull/942

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

jwoertink avatar Apr 13 '24 19:04 jwoertink