mirror of
				https://github.com/fastapi-users/fastapi-users.git
				synced 2025-11-04 14:45:50 +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:
 | 
					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)
 | 
					    email = fields.CharField(index=True, unique=True, null=False, max_length=255)
 | 
				
			||||||
    hashed_password = fields.CharField(null=False, max_length=255)
 | 
					    hashed_password = fields.CharField(null=False, max_length=255)
 | 
				
			||||||
    is_active = fields.BooleanField(default=True, null=False)
 | 
					    is_active = fields.BooleanField(default=True, null=False)
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user