I am trying migrate using django but I get this error and I have no idea what to do to fix it.
I have google the error message but all it was talking about postgres.
I have this in my model
budget = models.DecimalField(max_digits=10, decimal_places=2, null=True, blank=True)
# I used to have this though
budget = models.IntegerField(null=True, blank=True)
I was using this command
python manage.py makemigrations which generates the alter table fine but when I run the migrate python manage.py migrate this error would pop up.
Can someone please give me a hand?
Thanks in advance.
The error message indicates that you have existing numbers longer than 8 digits (10-2) in your table. You might try modifying the offending rows if possible, or increase the max_digits to allow larger numbers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With