You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was cloning my project to my laptop. I ran migrations and did not realise redis was not running and redis threw redis.exceptions.ConnectionError: Error -2 connecting to redis:6379. Name or service not known.
I started redis, and migrated again. This time finished with django.db.utils.ProgrammingError: relation "relation_name" already exists
Apparently if cachalot fails when performing cache invalidation during migrations, the exception is not handled gracefully and migration is not inserted into `django_migrations table.
What should've happened instead?
Either migration name should have been inserted into migration table and migration operation continued transparently, or migration should have been rolled back.
Steps to reproduce
create a django model
configure cachalot
make sure redis is not running
django-admin makemigrations
django-admin migrate see cache invalidation fails
start redis
django-admin migrate and migration fails because relation or model or field already exists.
Granted, I am using django 4.2.3, and redis 2.2.3, using django 4's built-in redis cache support, albeit officially supported. But I have seen in issues that it works. I did not have chance to try with other caches.
The text was updated successfully, but these errors were encountered:
What happened?
I was cloning my project to my laptop. I ran migrations and did not realise redis was not running and redis threw
redis.exceptions.ConnectionError: Error -2 connecting to redis:6379. Name or service not known.
I started redis, and migrated again. This time finished with
django.db.utils.ProgrammingError: relation "relation_name" already exists
Apparently if cachalot fails when performing cache invalidation during migrations, the exception is not handled gracefully and migration is not inserted into `django_migrations table.
What should've happened instead?
Either migration name should have been inserted into migration table and migration operation continued transparently, or migration should have been rolled back.
Steps to reproduce
django-admin makemigrations
django-admin migrate
see cache invalidation failsdjango-admin migrate
and migration fails because relation or model or field already exists.Granted, I am using django 4.2.3, and redis 2.2.3, using django 4's built-in redis cache support, albeit officially supported. But I have seen in issues that it works. I did not have chance to try with other caches.
The text was updated successfully, but these errors were encountered: