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

Adding a helpful error message for "Could not connect" #1047

Merged
merged 2 commits into from
Jun 28, 2024
Merged

Conversation

jwoertink
Copy link
Member

Fixes #983

I just got bit by this again. If your default user is postgres, you generally already have a database called postgres; however, in the case of Avram specs, we use the user lucky. This means you have to have a local db call lucky in order to run lucky db.create. This is because when we removed the pg_client dependency we no longer have access to createdb. Instead, we have to connect to the DB server and run some SQL... but postgres doesn't let you connect to the server without being attached to some database.. 🐔 🥚 🤷‍♂️

This PR just adds an error message that tells you

▸ If this is your first run, create a database named 'lucky' that this same user will have access to

That should at least point to a common fix for this problem.

@jwoertink jwoertink merged commit bec9058 into main Jun 28, 2024
9 checks passed
@jwoertink jwoertink deleted the issues/983 branch June 28, 2024 22:00
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

Successfully merging this pull request may close these issues.

Database connection fails for some database operations, but not dev server
1 participant