This one literally has me scratching my head. Working on a project. I’m fairly new to Django. Playing around building out new models and every once in awhile want to erase the database and just start over. I do this by deleting sqllite3 and everything in migrations folders of all apps except for init.py. Then just makemigrations and migrate. Works fine several times. Then I start getting an error on my makemigrations no such table brandprofile__brand. brandprofile is an app and Brand is the only model of that app. Some other models do have a FK relationship with Brand… But of course the table doesn’t exist when I run the command because no tables exist — there is no database at all. This is the initial makemigrations it should be creating all the necessary tables. Double check I did not miss any migration files but can’t figure it out.
Like I said I’ve been deleting and redoing the database a few times so I figure something got corrupted. I create a new virtual environment. Fresh install of django and required modules. Use django-admin to start a new project as well as all new apps. copy over the models views urls admin and forms files. Run makemigrations and get the same error no such table brandprofile__brand.
At this point I’m just going to try and rebuild one app at a time but any insight on what is going on would be appreciated.