diff options
Diffstat (limited to 'webmentions_ssg/models.py')
| -rw-r--r-- | webmentions_ssg/models.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/webmentions_ssg/models.py b/webmentions_ssg/models.py index 02c42ef..b6679e8 100644 --- a/webmentions_ssg/models.py +++ b/webmentions_ssg/models.py @@ -3,7 +3,6 @@ from __future__ import annotations import uuid from datetime import datetime, timezone from enum import StrEnum -from typing import Optional from flask_login import UserMixin from sqlalchemy import ( @@ -33,8 +32,8 @@ class User(UserMixin, Base): __tablename__ = "users" id: Mapped[int] = mapped_column(primary_key=True) - username: Mapped[str] = mapped_column(String(64), index=True, unique=True) - password_hash: Mapped[Optional[str]] = mapped_column(String(256)) + username: Mapped[str] = mapped_column(Text(), index=True, unique=True) + password_hash: Mapped[str] = mapped_column(Text(), nullable=False) def __repr__(self) -> str: return f"<User {self.username}>" |
