mirror of
https://github.com/fastapi/sqlmodel.git
synced 2025-10-27 03:15:54 +08:00
📝 Fix typo in docs/tutorial/fastapi/simple-hero-api.md (#1583)
📝 Update function name from create_tables to create_db_and_tables
This commit is contained in:
@ -60,7 +60,7 @@ And then create an `app` object that is an instance of that `FastAPI` class:
|
||||
|
||||
## Create Database and Tables on `startup`
|
||||
|
||||
We want to make sure that once the app starts running, the function `create_tables` is called. To create the database and tables.
|
||||
We want to make sure that once the app starts running, the function `create_db_and_tables` is called. To create the database and tables.
|
||||
|
||||
This should be called only once at startup, not before every request, so we put it in the function to handle the `"startup"` event:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user