bdragon300 / mongoengine-migrate

Migrations for MongoEngine inspired by Django
Apache License 2.0
17 stars 5 forks source link

AttributeError: GEOHAYSTACK #48

Closed Mohsen-Khodabakhshi closed 2 years ago

Mohsen-Khodabakhshi commented 2 years ago

Hi. In MongoDB version 5.0 and newer geoHaystack indexes removed, actually in PyMongo version 4.0 and newer too. Now mongoengine-migrate not working with PyMongo version 4.0 and newer, because in actions/base.py in line 611, you used GEOHAYSTACK. The error is: AttributeError: module 'pymongo' has no attribute 'GEOHAYSTACK' https://docs.mongodb.com/manual/core/geohaystack/ https://pymongo.readthedocs.io/en/4.0/api/pymongo/collection.html

Mohsen-Khodabakhshi commented 2 years ago

I fixed this in #49

bdragon300 commented 2 years ago

Hello, sorry for long answer. Looks good, merged. Thanks