[Answer]-Move package with migrations in django

1👍

As far as I know there is no automatic way to do that, so you’ll have to do the following by hand:

  1. Move your package to the new place
  2. Reflect this change in your settings.py INSTALLED_APPS
  3. In all the migration files of you package you have to edit the module path, table names and complete_apps list
  4. In your database table south_migrationhistory you have to edit the app_name column
  5. Rename the app table(s) in the database

That’s all. To check that everything is working properly you can type python manage.py schemamigration your_new_app_name –auto and if you did everything properly it will say that nothing have changed. Now you can continue working with your app as usual.

0👍

Another solution is just move package to another namespace/place but don`t change package name.

Leave a comment