diff --git a/fastapi_users_db_sqlalchemy/__init__.py b/fastapi_users_db_sqlalchemy/__init__.py index 467a2bf..58eeeb3 100644 --- a/fastapi_users_db_sqlalchemy/__init__.py +++ b/fastapi_users_db_sqlalchemy/__init__.py @@ -5,7 +5,7 @@ from fastapi_users.db.base import BaseUserDatabase from fastapi_users.models import ID, OAP, UP -from sqlalchemy import Boolean, ForeignKey, Integer, String, func, select +from sqlalchemy import Boolean, ForeignKey, Integer, String, func, select, Text from sqlalchemy.ext.asyncio import AsyncSession from sqlalchemy.orm import Mapped, declared_attr, mapped_column from sqlalchemy.sql import Select @@ -69,10 +69,10 @@ class SQLAlchemyBaseOAuthAccountTable(Generic[ID]): oauth_name: Mapped[str] = mapped_column( String(length=100), index=True, nullable=False ) - access_token: Mapped[str] = mapped_column(String(length=1024), nullable=False) + access_token: Mapped[str] = mapped_column(Text, nullable=False) expires_at: Mapped[Optional[int]] = mapped_column(Integer, nullable=True) refresh_token: Mapped[Optional[str]] = mapped_column( - String(length=1024), nullable=True + Text, nullable=True ) account_id: Mapped[str] = mapped_column( String(length=320), index=True, nullable=False