【发布时间】:2021-08-18 10:41:15
【问题描述】:
我已将 Lat Lng 浮点数迁移到 PointField 并在模型上添加了 GinIndex。
在 Django 上运行测试时,测试失败并出现以下错误,迁移正常。
django.db.utils.ProgrammingError: 关系“table_name_GeoLocation_id”已经存在
如果我在模型的下方注释掉,它就会通过。 test_db 似乎试图创建两次索引。
我能得到一些帮助吗?
indexes = [GinIndex(fields=["GeoLocation"])]
【问题讨论】:
-
您好,您可以编辑您的帖子以显示一些代码,以便人们可以帮助您