Forums

Can't add ManytoManyField to my site

So I have been trying to add a many-to-many field that works perfectly in my SQLite database in development, but when I pull this model to my production (here) on MySQL, it breaks the site and says that the table does not exist. I tried deleting my migrations in the folders and doing makemigrations then migrate but nothing. I do not know what to do and I'd appreciate any help. Is there something I should be doing when adding the ManyToMany field so it wont break the database? Thankfully, I git reset back to my last working commit, but I really want to figure this out for now and future dev. Thanks.

Maybe its cause I have different database types for my dev and production environments?

If it says the table doesn't exist, then it is definitely missing some kind of migrate. Perhaps you don't have the correct migrations created yet?

How would I go about fixing the migrations? On my dev server it works. I tried deleting all the migration files but nothing worked.

after you delete migration files you would have to make the migration files again and then migrate?