TablePlus / DBngin

DB Engine
https://dbngin.com
1.04k stars 19 forks source link

[feat] Add driver binaries to `$PATH` #117

Open joelbutcher opened 12 months ago

joelbutcher commented 12 months ago

Hey 👋

Thanks for this application, it is a massive contributor to making my daily work flow as efficient and easy as possible!

I'm not sure if you've visited this before, but I think it would be really helpful to add the binaries for each driver the the $PATH variable in macOS. This would fix an issue that I'm currently having with developing an application in Laravel that uses PostgreSQL and the Laravel's squashed migrations feature,

When restoring the database schema (from a .dump file), I'm getting the following error message:

pg_restore: command not found. 

After some quick investigation, I was able to resolve this by adding the following to my .zshrc file:

export PATH="$PATH:/Users/Shared/DBngin/postgresql/15.1/bin"
  1. Driver (Ex: PostgreSQL 10.0): PostgreSQL 15.1

  2. DBngin build number: 6.8 (68)

  3. macOS version: 14.0 (23A344)

  4. The steps to reproduce this issue: Install PostgeSQL driver (15.1) Open terminal Execute pg_restore See errror

huyphams commented 12 months ago

Hi @joelbutcher you can click the arrow button to open the terminal, DBngin will expose the variable into that terminal session. DBngin have multiple server versions so it would not add by default.

However, I agree that we should have a setting that allow DBngin add to binaries to the default path, but the user must choose the default database version first.

joelbutcher commented 12 months ago

@huyphams Thanks for your help!!

I agree, once the user installs the bandies for a driver, they should be asked whether they want to make this the default version for that driver and whether to add the binaries for that version to their systems PATH - would love to see this pushed through in an update, would make for one less troubleshooting worry for our newer devs 👍

mansurmetocrm commented 12 months ago

bump +1

joelbutcher commented 12 months ago

@mansurmetocrm As an OSS maintainer myself on GitHub, I'm gonna go ahead and say that sticking a "bump" comment on an issue can be extremely irritating when you rely on notifications to let you know when something important has happened on an issue or PR – I would suggest you use the 👍 reaction to the original message to let the maintainer know others are interested in this