@@ -24,7 +24,6 @@ class FieldDataType(StrEnum):
2424# register a DataTypeInfo with a FieldDataType to make it easier to support types
2525class DataTypeInfo (BaseModel ):
2626
27- pydantic_annotation : str
2827 sqlalchemy_type : str
2928 sqlalchemy_prefix : bool
3029 python_type : str
@@ -59,7 +58,6 @@ def all(self) -> list[DataTypeInfo]:
5958registry .register (
6059 FieldDataType .STRING ,
6160 DataTypeInfo (
62- pydantic_annotation = "str" ,
6361 sqlalchemy_type = "String" ,
6462 sqlalchemy_prefix = True ,
6563 python_type = "str" ,
@@ -72,7 +70,6 @@ def all(self) -> list[DataTypeInfo]:
7270registry .register (
7371 FieldDataType .INTEGER ,
7472 DataTypeInfo (
75- pydantic_annotation = "int" ,
7673 sqlalchemy_type = "Integer" ,
7774 sqlalchemy_prefix = True ,
7875 python_type = "int" ,
@@ -85,7 +82,6 @@ def all(self) -> list[DataTypeInfo]:
8582registry .register (
8683 FieldDataType .FLOAT ,
8784 DataTypeInfo (
88- pydantic_annotation = "float" ,
8985 sqlalchemy_type = "Float" ,
9086 sqlalchemy_prefix = True ,
9187 python_type = "float" ,
@@ -100,7 +96,6 @@ def all(self) -> list[DataTypeInfo]:
10096registry .register (
10197 FieldDataType .BOOLEAN ,
10298 DataTypeInfo (
103- pydantic_annotation = "bool" ,
10499 sqlalchemy_type = "Boolean" ,
105100 sqlalchemy_prefix = True ,
106101 python_type = "bool" ,
@@ -113,8 +108,7 @@ def all(self) -> list[DataTypeInfo]:
113108registry .register (
114109 FieldDataType .DATETIME ,
115110 DataTypeInfo (
116- pydantic_annotation = "datetime" ,
117- sqlalchemy_type = "DateTime" ,
111+ sqlalchemy_type = "DateTime(timezone=True)" ,
118112 sqlalchemy_prefix = True ,
119113 python_type = "datetime" ,
120114 faker_field_value = faker_placeholder .format (placeholder = '"date_time"' ),
@@ -127,9 +121,8 @@ def all(self) -> list[DataTypeInfo]:
127121registry .register (
128122 FieldDataType .UUID ,
129123 DataTypeInfo (
130- pydantic_annotation = "UUID" ,
131- sqlalchemy_type = "UUID" ,
132- sqlalchemy_prefix = False ,
124+ sqlalchemy_type = "UUID(as_uuid=True)" ,
125+ sqlalchemy_prefix = True ,
133126 python_type = "UUID" ,
134127 faker_field_value = str (uuid4 ()),
135128 value = str (uuid4 ()),
@@ -140,10 +133,9 @@ def all(self) -> list[DataTypeInfo]:
140133registry .register (
141134 FieldDataType .JSONB ,
142135 DataTypeInfo (
143- pydantic_annotation = "dict[str, Any]" ,
144136 sqlalchemy_type = "JSONB" ,
145137 sqlalchemy_prefix = False ,
146- python_type = "dict" ,
138+ python_type = "dict[str, Any] " ,
147139 faker_field_value = "{}" ,
148140 value = "{}" ,
149141 test_value = '{"key": "value"}' ,
0 commit comments