Skip to content

Instantly share code, notes, and snippets.

@jayuloy
Forked from mjhea0/move_model_to_new_app.md
Created October 4, 2015 08:30
Show Gist options
  • Save jayuloy/5ded20c1a8b9e0b471ab to your computer and use it in GitHub Desktop.
Save jayuloy/5ded20c1a8b9e0b471ab 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