fix + vershions configs

This commit is contained in:
Lev 2026-04-17 23:07:47 +03:00
parent 9987500ac0
commit 89651a8e81
5 changed files with 94 additions and 71 deletions

View file

@ -8,7 +8,7 @@ from .server import Server
class User(Base):
__tablename__ = "users"
id: Mapped[int] = mapped_column(primary_key=True, autoincrement=True)
email: Mapped[str] = mapped_column(String(256), index=True, nullable=False, unique=True)
email: Mapped[str] = mapped_column(String(256), index=True, nullable=False)
pass_hash: Mapped[str] = mapped_column(String(512), nullable=False)
server_id: Mapped[int] = mapped_column(ForeignKey("servers.id"))
created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now(), nullable=False)