mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2025-11-02 04:05:19 +08:00
Fix #77: use CharField for PK in Tortoise adapter
This commit is contained in:
@ -8,7 +8,7 @@ from fastapi_users.models import BaseUserDB
|
||||
|
||||
|
||||
class BaseUserModel:
|
||||
id = fields.TextField(pk=True, generated=False)
|
||||
id = fields.CharField(pk=True, generated=False, max_length=255)
|
||||
email = fields.CharField(index=True, unique=True, null=False, max_length=255)
|
||||
hashed_password = fields.CharField(null=False, max_length=255)
|
||||
is_active = fields.BooleanField(default=True, null=False)
|
||||
|
||||
Reference in New Issue
Block a user