From 61d80b049dade0d10de72eb3204491581174323d Mon Sep 17 00:00:00 2001 From: Anas Khan <83116240+anxkhn@users.noreply.github.com> Date: Sun, 5 Jul 2026 12:42:33 +0530 Subject: [PATCH] docs: correct create_engine description in create-db-and-table SQLModel re-exports SQLAlchemy's create_engine directly (sqlmodel.create_engine is sqlalchemy.create_engine), it does not define its own wrapper. The previous text described an obsolete future=True default and SQLAlchemy 1.4/2.0 framing that no longer applies now that SQLModel requires SQLAlchemy 2.0. Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com> --- docs/tutorial/create-db-and-table.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/tutorial/create-db-and-table.md b/docs/tutorial/create-db-and-table.md index a7cd9e3f6c..35b42dbe3a 100644 --- a/docs/tutorial/create-db-and-table.md +++ b/docs/tutorial/create-db-and-table.md @@ -204,9 +204,9 @@ If you didn't know about SQLAlchemy before and are just learning **SQLModel**, y You can read a lot more about the engine in the [SQLAlchemy documentation](https://docs.sqlalchemy.org/en/14/tutorial/engine.html). -**SQLModel** defines its own `create_engine()` function. It is the same as SQLAlchemy's `create_engine()`, but with the difference that it defaults to use `future=True` (which means that it uses the style of the latest SQLAlchemy, 1.4, and the future 2.0). +**SQLModel** re-exports SQLAlchemy's `create_engine()` directly, so `sqlmodel.create_engine` is the same function as `sqlalchemy.create_engine`. SQLModel requires SQLAlchemy 2.0 or above, which uses the modern 2.0 style by default. -And SQLModel's version of `create_engine()` is type annotated internally, so your editor will be able to help you with autocompletion and inline errors. +SQLAlchemy's `create_engine()` is type annotated, so your editor will be able to help you with autocompletion and inline errors. ## Create the Database and Table