fix: normalize batch insert rows to prevent silent data loss for nullable columns (#192)

This commit is contained in:
d3vyce
2026-03-27 19:20:41 +01:00
committed by GitHub
parent 5215b921ae
commit f4698bea8a
3 changed files with 128 additions and 8 deletions

View File

@@ -57,6 +57,7 @@ class User(Base):
username: Mapped[str] = mapped_column(String(50), unique=True)
email: Mapped[str] = mapped_column(String(100), unique=True)
is_active: Mapped[bool] = mapped_column(default=True)
notes: Mapped[str | None]
role_id: Mapped[uuid.UUID | None] = mapped_column(
ForeignKey("roles.id"), nullable=True
)