v1k45 / django-notify-x

Notification system for Django
MIT License
187 stars 40 forks source link

Notification Type Field is too short #48

Open KeithyIrwin opened 6 years ago

KeithyIrwin commented 6 years ago

In the notification model, the nf_type field is only 20 characters. When used with a database which enforces length limits (i.e. not sqlite), it's very easy to go over this and get an error. For example, in your example notification code in the documentation you use a notification type of "video_upload_from_following". That's 27 characters and will cause a database error. A longer length seems the best fix. I've hot-patched our system to use 50 characters to fix the error we were running into, but I wouldn't object to an even larger size.