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
After I imported the data, I wanted to restart fresh, so I tried to migrate backward.
Unapplying cities_light.0010_auto_20200508_1851...Traceback (most recent call last):
File ".../lib/python3.11/site-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
psycopg2.errors.UniqueViolation: could not create unique index "cities_light_city_region_id_name_29b81cd4_uniq"
DETAIL: Key (region_id, name)=(57, Neston) is duplicated.
Since I wanted to restart fresh, I deleted the offending cities. But I got more from the slug, too:
Unapplying cities_light.0010_auto_20200508_1851...Traceback (most recent call last):
File ".../.venv/lib/python3.11/site-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
psycopg2.errors.UniqueViolation: could not create unique index "cities_light_city_region_id_slug_dc18c213_uniq"
DETAIL: Key (region_id, slug)=(57, ashford) is duplicated.
Since there is duplication, It is impossible to revert to the old unique_together key which is : 'unique_together': set([('region', 'name'), ('region', 'slug')]),
The text was updated successfully, but these errors were encountered:
Lorac
changed the title
0010_auto_20200508_1851 doesn't seem to be reversable
The 0010_auto_20200508_1851 migration doesn't seem to be reversable
Jul 5, 2024
It's not recommended because of this public library is being used across multiple servers in different situations. There are on other status and we want to allow them to move to a new version of the library without any issues.
After I imported the data, I wanted to restart fresh, so I tried to migrate backward.
Since I wanted to restart fresh, I deleted the offending cities. But I got more from the slug, too:
Since there is duplication, It is impossible to revert to the old unique_together key which is :
'unique_together': set([('region', 'name'), ('region', 'slug')]),
The text was updated successfully, but these errors were encountered: