On Aug 26, 9:35 am, adelaide_mike <mike.ro...@internode.on.net> wrote:
> After adding a model to my Django 1.0.2 app I would like to change the
> names of two models.  Will the syncdb take care of this for me?  I
> anticipate I will need to change the table names in PostgreSQL.
>
> Any caveats?  Any hints?  TIA
>
> Mike

No, syncdb won't do anything - or rather, it will recreate the models
from scratch with the new names, leaving the old ones still there.

The easiest thing to do would probably be to use the db_table option
in the models' Meta class, setting it to the old table names, then
everything will just work (although it might be a bit confusing if you
ever need to access the database manually).
http://docs.djangoproject.com/en/dev/ref/models/options/#db-table
--
DR.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to