forked from cartsnitch/cartsnitch
fix(auth): make users.hashed_password nullable
Better-Auth inserts into users without a hashed_password value (passwords are stored in the accounts table). This was causing a NOT NULL constraint violation and 422 FAILED_TO_CREATE_USER on sign-up. Revision ID: 003_make_users_hashed_password_nullable Resolves: CAR-172 Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -21,7 +21,7 @@ class User(UUIDPrimaryKeyMixin, TimestampMixin, Base):
|
||||
__tablename__ = "users"
|
||||
|
||||
email: Mapped[str] = mapped_column(String(255), nullable=False, unique=True)
|
||||
hashed_password: Mapped[str] = mapped_column(String(255), nullable=False)
|
||||
hashed_password: Mapped[str | None] = mapped_column(String(255), nullable=True)
|
||||
display_name: Mapped[str | None] = mapped_column(String(100))
|
||||
email_verified: Mapped[bool] = mapped_column(Boolean, nullable=False, server_default="false")
|
||||
image: Mapped[str | None] = mapped_column(Text, nullable=True)
|
||||
|
||||
Reference in New Issue
Block a user