init_db
Initializes the database by checking for the existence of the initial superuser and creating it if it does not already exist.
def init_db(
session: Session
) - > None
Initializes the database by creating the initial superuser if it does not already exist. This ensures the system has a primary administrative account based on the configured environment settings.
Parameters
| Name | Type | Description |
|---|---|---|
| session | Session | The SQLModel session object used to execute database queries and persist the new user record. |
Returns
| Type | Description |
|---|---|
None | Nothing is returned; the function performs an in-place database update. |