Wednesday, April 20, 2011

What happens to DB data when I change my models?

Hi I'm new to Django,
I've read the tutorial and some more.
I've been writing some models and trying to get them to work.
I've noticed that when I change my models, it changes the SQL tables
under the covers but it tries to preserve data that I've put into my
DB
through the admin or through python shell commands.
I am not very experienced with DB but common sense would suggest
that if you change the structure of the data ( the Django model )
and try to fit the old data around the new structure,
bad stuff could happen.
I am getting some strange DB integrity errors,
usually suggesting that an id key is not defined in the DB.
Could this be because changing my models has messed up my DB
integrity?
I've noticed that in the tutorial they don't seem to mention how the
data
in your DB changes if models are changed.
Any help would be appreciated
Dug

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate