Django - doesn`t make the migrations

In Django, after I created a model, in cmd I runned: "python makemigrations" and returned that: Migrations for 'hello': hello\migrations\ - Create model Article hello is the name of app. And after I runned: "python migrate" returned: Operations to perform: Apply all migrations: admin, auth, contenttypes, hello, sessions Running migrations: No migrations to apply.

And when I try to introduce a field in that model appear: OperationalError at /admin/hello/article/add/ no such table: hello_article

I tried to delete all migrations and I created again the model and the result was the same. How fix this?

I suggest you try deleting migration files in migration folder and then delete db.sqlite3 since model tables are stored in the database. Now run python makemigrations and finally run python migrate

Back to Top