Home > Mobile >  how to remove deprecated code from the old django migration files
how to remove deprecated code from the old django migration files

Time:01-12

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?

CodePudding user response:

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

CodePudding user response:

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

  • Related