Skip to content

postgreSQL: SQLModel.metadata.create_all(engine) doesn't create the database file #1523

Discussion options

You must be logged in to vote

Code examples in docs use SQLite for simplicity. SQLIte creates DB file automatically if not exist.

PostgreSQL is more complex thing and it works differently - you need to start the database server (the easiest way is to start the docker container) and create the database manually before running the code.

See:

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by YuriiMotov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
3 participants
Converted from issue

This discussion was converted from issue #66 on August 15, 2025 06:56.