Re: How is MySQL syntax for a table changed if I had a ManyToManyField?

2018-07-14 Thread Gerald Brown
When looking at my database it has the 3rd table for the ManyToMany with the following: 1. ID auto-generated, 2. Table1.ID 3. Table2.ID. All fields will be integers. The 3rd table will be named Table1_Table2 or something like that. I noticed in your code below that you do not have an ID fie

Re: How is MySQL syntax for a table changed if I had a ManyToManyField?

2018-07-14 Thread mottaz hejaze
for many to many relationships between two tables .. you can make a third table that only contains the id fields ftom both tables , then you can make a third model for this table On Fri, 13 Jul 2018, 22:24 , wrote: > I tried for hours to get django's migrate/makemigrations function work but > mi

How is MySQL syntax for a table changed if I had a ManyToManyField?

2018-07-13 Thread lissandrathegray
I tried for hours to get django's migrate/makemigrations function work but miserably couldn't so I created my tables in MySQL. Now I'm trying to add a ManyToManyField between 2 models but am not sure how the MySQL syntax is supposed to look like. This is my current code: from django.db import