rest-apis-flask-python
rest-apis-flask-python copied to clipboard
ch11 step 1 render.com does not create the tables
Running the app on render.com triggers the following
OperationalError sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: stores [SQL: SELECT stores.id AS stores_id, stores.name AS stores_name FROM stores] (Background on this error at: https://sqlalche.me/e/20/e3q8)
Seems like the data.db is not created when running the app
Same behavior on local app: flask db upgrade is necessary to trigger the creation. However, since data.db is on the gitignore file it does not get sent to render.com
Possible fix is
RUN flask db upgrade
in the Docker file
Proposed PR https://github.com/tecladocode/rest-apis-flask-python/pull/136
Closing via #136