Skip to content

Commit ef4118b

Browse files
committed
fix: Optimized TextChoicesType character default length and fixed alembic error
1 parent 69b18da commit ef4118b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

fastapi_amis_admin/models/_sqltypes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77

88
class BaseChoicesType(types.TypeDecorator):
9-
def __init__(self, choices: Type[Choices], impl=None, *args, **kwargs):
9+
def __init__(self, choices: Type[Choices] = None, impl=None, *args, **kwargs):
1010
super().__init__(*args, **kwargs)
1111
self.choices = choices
1212

@@ -24,7 +24,7 @@ def process_result_value(self, value, dialect):
2424

2525

2626
class TextChoicesType(BaseChoicesType):
27-
impl = types.CHAR
27+
impl = types.CHAR(40)
2828
cache_ok = True
2929

3030

0 commit comments

Comments
 (0)