Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/344.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2008/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python django.db.utils.DataError:数值字段溢出-django_Python_Django_Postgresql_Decimal - Fatal编程技术网

Python django.db.utils.DataError:数值字段溢出-django

Python django.db.utils.DataError:数值字段溢出-django,python,django,postgresql,decimal,Python,Django,Postgresql,Decimal,我正在尝试使用django进行迁移,但是我遇到了这个错误,我不知道该怎么做才能修复它 我在谷歌上看到了错误信息,但都是关于postgres的 我的模型里有这个 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) 我在使

我正在尝试使用django进行迁移,但是我遇到了这个错误,我不知道该怎么做才能修复它

我在谷歌上看到了错误信息,但都是关于postgres的

我的模型里有这个

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)
我在使用这个命令
python manage.py makemigrations
生成alter表,但当我运行migrate
python manage.py migrate
时,会弹出此错误

谁能帮我一下吗


提前感谢。

错误消息表示您的表中已有超过8位(10-2)的数字。如果可能,您可以尝试修改有问题的行,或者增加
max\u位
以允许更大的数字