mirror of
https://github.com/fastapi/sqlmodel.git
synced 2026-03-13 09:29:54 +08:00
➖ Drop support for Python 3.8 in CI and docs (#1695)
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com> Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
d7b596b1dd
commit
afc0c324cf
@@ -6,7 +6,7 @@
|
||||
|
||||
4. Create the `id` field:
|
||||
|
||||
It could be `None` until the database assigns a value to it, so we annotate it with `Optional`.
|
||||
It could be `None` until the database assigns a value to it, so we annotate it with `Optional` (`int | None` in Python 3.10+).
|
||||
|
||||
It is a **primary key**, so we use `Field()` and the argument `primary_key=True`.
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
In the database, the default value will be `NULL`, the SQL equivalent of `None`.
|
||||
|
||||
As this field could be `None` (and `NULL` in the database), we annotate it with `Optional`.
|
||||
As this field could be `None` (and `NULL` in the database), we annotate it with `Optional` (`int | None` in Python 3.10+).
|
||||
|
||||
8. Write the name of the database file.
|
||||
9. Use the name of the database file to create the database URL.
|
||||
|
||||
Reference in New Issue
Block a user