Increase CharEnumField max_length to 20 for scheduled_messages

Fixes aerich migration failure: value too long for type character varying(10)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-04 10:54:41 -04:00
parent 467e752629
commit 489066940d
+3 -3
View File
@@ -26,15 +26,15 @@ class Recurrence(enum.Enum):
class ScheduledMessage(Model): class ScheduledMessage(Model):
id = fields.UUIDField(primary_key=True) id = fields.UUIDField(primary_key=True)
recipient = fields.CharField(max_length=255) recipient = fields.CharField(max_length=255)
channel = fields.CharEnumField(enum_type=MessageChannel, max_length=10) channel = fields.CharEnumField(enum_type=MessageChannel, max_length=20)
content = fields.TextField() content = fields.TextField()
subject = fields.CharField(max_length=255, null=True) subject = fields.CharField(max_length=255, null=True)
scheduled_at = fields.DatetimeField() scheduled_at = fields.DatetimeField()
status = fields.CharEnumField( status = fields.CharEnumField(
enum_type=MessageStatus, max_length=10, default=MessageStatus.PENDING enum_type=MessageStatus, max_length=20, default=MessageStatus.PENDING
) )
recurrence = fields.CharEnumField( recurrence = fields.CharEnumField(
enum_type=Recurrence, max_length=10, default=Recurrence.NONE enum_type=Recurrence, max_length=20, default=Recurrence.NONE
) )
error_message = fields.TextField(null=True) error_message = fields.TextField(null=True)
created_by = fields.ForeignKeyField( created_by = fields.ForeignKeyField(