Increase field max_length for Notification.notification_class
jordanmkoncz opened this issue · 2 comments
The Notification
model has a field notification_class = models.CharField(max_length=80, unique=True)
. This max_length
restriction of 80 characters is causing an issue for me, because I'm trying to create a notification class that happens to be 83 characters long, so I'm getting an error django.db.utils.DataError: (1406, "Data too long for column 'notification_class' at row 1")
.
The SentNotification
model also has a field notification_class
, but with a less restrictive max_length
of 255 characters.
Is there a reason why the Notification
model has an inconsistent and much more restrictive max_length
for its notification_class
field than that of the SentNotification
model? If not, can we increase it to match the SentNotification
model, otherwise you have to artificially limit the names of your notification classes in order to fit within this restriction.
Thanks for the report. No, there is no reason why this is so restrictive. This should be changed to match the SentNotification model.
Would you be up to submitting a pull request?
Done @jproffitt :)