Forums

Postgres with Flask app is not showing any tables

I cannot for the life of me figure out what is going wrong. This is my first time deploying on a server. Everything worked great on my local Flask test server. When I was on my test server, when I would create a new sqlalchemy model, and then do 'flask db migrate -m' and then 'flask db upgrade' in the console, it would create the tables in my postgres database. Now however, nothing happens, nothing will work. In psql (postgres console), when I enter the command '\dt', I get 'no relations found'. It's like it's not creating my tables.

I already created a new user, set the password, I created a new database and I can see the database when I enter '\l'.

Any help is greatly appreciated.

EDIT: Nevermind. psql was connected to a database called 'postgres' by default. That is not the database that I created for my app, or what my app was connected to. Man, that was frustrating.

Ouch, that sounds like it was not fun to work out! Glad you sorted it out eventually, anyway.