Skip to content

ch11 step 1 render.com does not create the tables #135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
teksaver opened this issue Jun 3, 2023 · 3 comments
Closed

ch11 step 1 render.com does not create the tables #135

teksaver opened this issue Jun 3, 2023 · 3 comments

Comments

@teksaver
Copy link
Contributor

teksaver commented Jun 3, 2023

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

@teksaver
Copy link
Contributor Author

teksaver commented Jun 3, 2023

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

@teksaver
Copy link
Contributor Author

teksaver commented Jun 3, 2023

Proposed PR #136

@jslvtr
Copy link
Contributor

jslvtr commented Apr 4, 2024

Closing via #136

@jslvtr jslvtr closed this as completed Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants