> Den 09/06/2015 kl. 10.09 skrev Mike Dewhirst <[email protected]>:
> 
> Does anyone have any experience with app-renames and maybe some refactoring 
> advice for me?
> 
> Maybe I don't even need to replace and destroy ...

If you wanted, you could set Meta.db_table for all models to the current table 
name. Then you shouldn't need to migrate any data. In your Python code, simply 
rename the directory and everything referencing the app, and you should be good 
to go, unless your code contains too much clever magic.

I can't remember if Django migrations detect table renames. If not, and you 
want to rename the tables too, just issue raw "ALTER TABLE name RENAME TO 
new_name" SQL in an empty migration.

Erik

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2FED37F9-2951-4CA2-84AC-BA62D3C20010%40cederstrand.dk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to