mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2025-11-03 13:42:16 +08:00
Added python_type into GUID (#648)
This commit is contained in:
@ -18,8 +18,10 @@ class GUID(TypeDecorator): # pragma: no cover
|
|||||||
Uses PostgreSQL's UUID type, otherwise uses
|
Uses PostgreSQL's UUID type, otherwise uses
|
||||||
CHAR(36), storing as regular strings.
|
CHAR(36), storing as regular strings.
|
||||||
"""
|
"""
|
||||||
|
class UUIDChar(CHAR):
|
||||||
|
python_type = UUID4
|
||||||
|
|
||||||
impl = CHAR
|
impl = UUIDChar
|
||||||
|
|
||||||
def load_dialect_impl(self, dialect):
|
def load_dialect_impl(self, dialect):
|
||||||
if dialect.name == "postgresql":
|
if dialect.name == "postgresql":
|
||||||
|
|||||||
Reference in New Issue
Block a user