Skip to content

Instantly share code, notes, and snippets.

@peterfarrell
Forked from mjhea0/move_model_to_new_app.md
Last active August 29, 2015 14:10
Show Gist options
  • Save peterfarrell/fb7cbf132982534a5c8c to your computer and use it in GitHub Desktop.
Save peterfarrell/fb7cbf132982534a5c8c to your computer and use it in GitHub Desktop.
  1. generate an empty migration
  2. move the migration from old_app to new_app
  3. edit the migration file to change all instances of old_app to new_app
  4. add a forward migration to rename the table from something to something_else
  5. add a backward migration to do the opposite
  6. move models.py from old_app to new_app
  7. apply the migration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment