Django: No tables found in the database after running migrations

I'm working on a Django project, but I'm facing an issue where no tables are being created in my database even after running migrations. Django version:5.1.3 Database:MySQL OS:ubuntu 24.04.1 LTS

1 I ran python manage.py makemigrations, and it successfully generated migration files 2 I ran python manage.py migrate, and it executed without any errors. 3 However, when I check the database in phpmyadmin, No tables found in database.

I also tried these troubleshooting steps:

1 Verified that the database file exists. 2 Ensured that the INSTALLED_APPS list includes my app. 3 Checked that the models are defined properly in the models.py file. 4 Looked for migration history with python manage.py showmigrations, and all migrations are marked as applied.

What could be causing this issue? Are there any additional steps I can take to debug or resolve this problem? I’d appreciate any guidance or suggestions. Let me know if more information is needed.

Вернуться на верх