
上QQ阅读APP看书,第一时间看更新
Changing a foreign key to the many-to-many field
This recipe is a practical example of how to change a many-to-one relation to a many-to-many relation, while preserving the already existing data. We will use both schema and data migrations in this situation.