1

So I just need to direction on understanding a postgres installation better, because clearly I only know enough to be dangerous.

I had an app that was my project with a postgres DB installed via homebrew

Then I started collaborating on a project with other people

There was some difficulty getting my existing prostgres install to work with the new project so I installed the postgres app with the gui interface to start stop the db.

That new project is finished and I wanted to get back to work on my other project

When I started the first app up, it couldn't find a db. I tried drop the db, and recreating it, but when I run the migrations it says the tables already exist.

What can I do to get around this?

1 Answer 1

1

A good approach would be using Docker so everyone have the same environment. This would mean even you, across your machines or your working colleagues or collaborators would have the same environment. You could have many containers running (watching exposing different ports for Postgres, i.e: 5433...) and when a project finishes just get rid of the container.

This approach saves you the overhead of having to maintain multiple databases locally or depending on a running Postgres process (which I sometimes forget to start).

If you need to solve this locally, try starting your postgres service, connecting to your localhost instance and running:

> psql
psql (9.6.2)
Type "help" for help.

> \l

and you should see all of your databases and debug them. Perhaps deleting and creating the conflicting database (if you don't need your local data) could help.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.