Changes between Initial Version and Version 1 of Ticket #28987, comment 8
- Timestamp:
- Nov 6, 2022, 12:49:44 PM (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #28987, comment 8
initial v1 1 While altering a many to many field , a new table is created (which is later renamed) and data is copied from old table to new table and then old table is deleted. This issue caused while making this new table [https://github.com/django/django/blob/main/django/db/backends/sqlite3/schema.py#L496 here], we are only altering the {{{m2m_reverse_fields}}} ignoring the {{{m2m_fields}}} that points to our model. 1 While altering a many to many field , a new table is created (which is later renamed) and data is copied from old table to new table and then old table is deleted. This issue caused while making this new table [https://github.com/django/django/blob/main/django/db/backends/sqlite3/schema.py#L496 here], we are only altering the {{{m2m_reverse_fields}}} ignoring the {{{m2m_fields}}} that points to our model. But both {{{m2m_reverse_fields}}}and {{{m2m_fields}}} needs to be changed. 2 2 Hope i'm proceeding into the right direction.