watthell234 / HitchIn_backend

This is a great problem to solve for gov't. They are usually so behind with Technology that citizens need to offer solutions.
2 stars 0 forks source link

Db issues #1

Closed daxaxelrod closed 3 years ago

daxaxelrod commented 4 years ago

https://github.com/watthell234/HitchIn/blob/5ecc7825d4a845be484eae81e5948a0235408eb0/wsgi.py#L5

This line will create a new database every single time you deploy. I think its a good time to look into real persistent storage. Heroku offers a very basic postgres instance with the free tier. Check gymhop backend for how this is done

watthell234 commented 4 years ago

I have that set up in Heroku. I am getting an db.init_app issue now when making a request. ᐧ

On Sat, Jun 13, 2020 at 2:03 PM David Axelrod notifications@github.com wrote:

https://github.com/watthell234/HitchIn/blob/5ecc7825d4a845be484eae81e5948a0235408eb0/wsgi.py#L5

This line will create a new database every single time you deploy. I think its a good time to look into real persistent storage. Heroku offers a very basic postgres instance with the free tier. Check gymhop backend for how this is done

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/watthell234/HitchIn/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADBOA7X24JCSUBXQPLJK7OTRWO5NZANCNFSM4N5CUODA .

-- Julius C. Gonzalez

daxaxelrod commented 4 years ago

whats the issue?

Your database should be migrated once (meaning all your tables get setup) and then you use those tables in the application.

watthell234 commented 3 years ago

I've deleted the db.init_app from my code. Migrations can happen with no problem.

watthell234 commented 3 years ago

Closing since issue has been resolved