CMSC495-Team1 / Team1_TripPlanner

1 stars 1 forks source link

Initialize DB #20

Closed pastelApe closed 5 days ago

pastelApe commented 1 week ago

Ran into this issue with the DB with team 5 as well. I don't see an sql script in the project. We can add insert statements to run if the DB is empty when the app is ran. That way we don't have to manually handle it. How did you guys build the DB?

pastelApe commented 1 week ago

Ok, I see how SQLAlchemy works with the db models. I think there are a few other things we should have in .env. I'll create a PR with my suggestions.

pastelApe commented 1 week ago

After looking into the code more, I do not see how the data in the database is initialized. Can someone point me in the right direction? Is there a script missing from the repo? Reason being is I moved the state images into a trip blueprint and the images don't populate because the path in the Destination.image_url is not dynamic. It's looking for them in the traditional static location.

pastelApe commented 5 days ago

Database is now created automatically when the app is ran.