Guest User

Untitled

a guest
Jun 21st, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. Simple django management command to automate the process of renaming an existing table, recreating via syncdb, and inserting the old data into the new table. Currently does not handle field renames - will eat your data if you try.
  2.  
  3. To install, save this file into an installed django app's management/commands/ directory, eg
  4.  
  5. myapp/management/commands/simplemigration.py
  6.  
  7. Run the command from the command line as follows
  8.  
  9. python manage.py simplemigration APPNAME.MODELNAME
Add Comment
Please, Sign In to add comment