How change from ForeignKey to ManyToManyField in Django?
There are really two ways to go here (that I can think of off top of my head):

Create a temporary field to store the current data of videos.Video.machine, remove videos.Video.machine field, add videos.Video.machine back as a m2m field, migrate the data from the temporary field into this new field, and remove the temporary field.
Create a new field, i.e. videos.Video.machines that is m2m, copy the current field videos.Video.machine into it, and then remove the videos.Video.machine field.

I would personally go with the second since it is not only easier but the naming makes more sense anyway!
I'm trying to change one variable from ForeignKey to ManyToManyField. Obtained the following error when I try to do a command migrate:
"ValueError: Cannot alter field videos.Video.machine into videos.Video.machine - they are not compatible types (you cannot alter to or from M2M fields, or add or remove through= on M2M fields)"
How can solve this problem?