How to remove deprecated code from the old django migration files

I am removing dead code in my django apps, and realized that one of the functions is being used in an old migration file. What is the correct way to remove this code from the old migration file without causing database issues?

Just delete migrations folder in your project. I'm sure you don't have any database issues

You might try the django squashmigrations command, and see if it recognises and removes the redundancy. More about squashing migrations in the docs.

Back to Top