You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Heroku we cannot create or delete our database and thats why the schema file has them create tables only. Locally however, this will create tables top level in their pg console. I think would be valid to add instructions for pushing code that has only table creation, but their local database still needs to be created and they can do that via the psql terminal or adding a line that they comment out or remove for Heroku pushes.
Secondly, there seems to be some confusion about their ENV files. Most groups have created their ENV vars in Heroku, and also added those to their local .env files.
The text was updated successfully, but these errors were encountered:
Point 2 🤕 - I am open to clarifying the instructions further.
I have always seen it be a large challenge for students to understand hat they now have a local database and a database in the cloud. Additionally git does not track/update/sync their local database with the deployed one. This tends to be a point that needs to addressed multiple times, usually once the students are facing the issue directly before it clicks. If you have better ways of explaining/addressing it I am open.
Yes, to create an out-of-the-box ready to go/near 0 config template, the best I could come up with was dumping it into their local postgres db. I attempted to write a SQL function that checks if the host is localhost (success!) and then connects to their specific db (not the default one set by heroku) -fail I ran out of time.
I thought about creating separate files and running them separately depending on heroku/local but I thought that would
a) add more confusion
b) require them to have two sources of truth as far as schema/seeding
Recently, I was looking at you code for testing the back-end, and for future iterations, perhaps the correct thing to do would be to utilize pg-promise to set up the schema and seed the db. - I am open to updating for future iterations.
In Heroku we cannot create or delete our database and thats why the schema file has them create tables only. Locally however, this will create tables top level in their pg console. I think would be valid to add instructions for pushing code that has only table creation, but their local database still needs to be created and they can do that via the psql terminal or adding a line that they comment out or remove for Heroku pushes.
Secondly, there seems to be some confusion about their ENV files. Most groups have created their ENV vars in Heroku, and also added those to their local
.env
files.The text was updated successfully, but these errors were encountered: