I am running ``python manage.py migrate``and I see steps like “Applying xxx.0001_initial… OK“ displayed. But the application tables are not created. I tried running with “-v3“ and I see no errors. I do see some tables created (auth_group,…), but not application tables. I removing the files from the migrations folder and regenerating they via```python manage.py makemigrations``` which generates files, but the next step to generate the tables still does not work. Note, I am using sqlite, so I have been deleting the database before generating the table.
Welcome @rmundkowsky !
To confirm that I’m understanding you correctly, you have done:
- Deleted the
db.sqlitefile (or whatever name you use for the database file). - Run
python manage.py makemigrations - Verified that you have migration files in your app’s
migrationsdirectory - Run
python manage.py migrate
How have you verified that the “application tables” have not been created?
If you run python manage.py showmigrations, does it show your app’s migration files?
What is the content of your INSTALLED_APPS setting?
Running “.tables“ in sqlite shows all the tables created. Yes, running showmigrations displays the migrations for the application. `INSTALLED_APPS` has a long list of applications, but I just tried it with limiting down to the application having the issue, so ``INSTALLED_APPS = ["xxx"]```
Please post the output from all those commands here. Just posting a summary does not help us help you.
(No, you should not change INSTALLED_APPS.)
Sorry for the slow response.
base.py contains:
INSTALLED_APPS = [ "grappelli", "filebrowser", "django.contrib.admin", "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sessions", "django.contrib.messages", "django.contrib.statifiles", "allauth", "allauth.account", "allauth.socialaccount", "allauth.usersessions", "allauth.socialaccount.providers.openid_connect", "corsheaders", "xxx", "health_check", "health_check.db", "health_check.contrib.migrations", "drf_yasg", "rest_framework", "oauth2_provider", ]
local.py imports base and adds these apps:
INSTALLED_APPS = [ "whitenoise.runserver_nostatic", *INSTALLED_APPS, "behave_django" ]
Also I ran the following and I am “-- (no-op)” rather than SQL statements.
python manage.py sqlmigrate xxx 0001