How to change a OneToOneField into ForeignKey in django model with data in both table?
makemigrations in this case would only correspond to an sql of Alter field you can see the result of makemigrations, the same sql will be executed when you migrate the model so the data would not be affected
I am having a model Employee with a OneToOneField relationship with Django USER model. Now for some reason, I want to change it to the ManyToOne(ForeignKey) relationship with the User model.
Both these tables have data filled. Without losing the data how can I change it?
Can I simply change the relationship and migrate?