It is correct. Syncdb will not alter existing tables:
http://docs.djangoproject.com/en/1.2/ref/django-admin/#syncdb
The reason is that if you've changed you model with some kind of
constrains (unique fields, etc), Django will not try to guess how to
mantain the correctness of your data. It is your task.
Renne Rocha
renne...@gmail.com
http://www.linkedin.com/in/rennerocha
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
No fixtures found: it means to tell you that it didn't find any
special-named "initial_data" fixtures.
Regular fixtures must/can be loaded with "manage.py loaddata fixturename".
> A solution has been to drop the table in MySQL before running syncdb.
> This doesn't seem feasible all the time. What could I be doing wrong?
It is a (sensible) restriction of syncdb: it only creates missing
tables. If you modified a table, the table is still there, so it won't
re-add it. Doing so would mean potential data corruption.
So if you added fields to a model, you'll have to add that field by hand
to the table.
An alternative is for instance South (http://south.aeracode.org/) which
*can* do the database migration for you, also in the case of added fields.
Reinout
--
Reinout van Rees - rei...@vanrees.org - http://reinout.vanrees.org
Programmer at http://www.nelen-schuurmans.nl
"Military engineers build missiles. Civil engineers build targets"
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Thanks Reinout. I have been seeing a lot of discussions regarding South lately - time to dive in and find out what it is and what it means for me.
I was under the impression that Django would add a field to my table. So, is syncdb only good during initial database setup?
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
During development phase, I actually drop and recreate my database, then run syncdb etc to make sure I’ve got a clean start. Probably not practical once I get into production.
--
1. Add/Update field model.py
2. Add/Update in database to match (phpMyAdmin makes life so much simpler).
--
Condor
310.951.1177
condo...@gmail.com
:%s/war/peace/g