Skip to content

Commit 29c33bc

Browse files
committed
Merge branch 'feat/soft-delete' of https://github.com/letsdeepchat/sqlmodel into feat/soft-delete
2 parents f63215b + 1676746 commit 29c33bc

4 files changed

Lines changed: 4 additions & 5 deletions

File tree

docs_src/tutorial/fastapi/app_testing/tutorial001_py310/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from contextlib import asynccontextmanager
2+
23
from fastapi import Depends, FastAPI, HTTPException, Query
34
from sqlmodel import Field, Session, SQLModel, create_engine, select
45

docs_src/tutorial/fastapi/update/tutorial002_py310.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from contextlib import asynccontextmanager
2-
31
from fastapi import FastAPI, HTTPException, Query
42
from sqlmodel import Field, Session, SQLModel, create_engine, select
53

scripts/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ set -x
66
coverage run --source=sqlmodel -m pytest tests/
77
coverage combine
88
coverage report --show-missing
9-
coverage html --title="SQLModel Coverage"
9+
coverage html --title="SQLModel Coverage"

sqlmodel/soft_delete.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from datetime import datetime
2-
from typing import Optional
32

43
from sqlmodel import Field
54

@@ -11,4 +10,5 @@ class SoftDeleteMixin:
1110
Usage:
1211
class MyModel(SQLModel, SoftDeleteMixin, table=True): ...
1312
"""
14-
deleted_at: Optional[datetime] = Field(default=None)
13+
14+
deleted_at: datetime | None = Field(default=None)

0 commit comments

Comments
 (0)