4

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.

0

1 Answer 1

6

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.