On 08/24/2010 04:17 PM, Sithembewena Lloyd Dube wrote:
Hi all,
I have been working on some models and tried to run the manage.py syncdb
command. It says there are no fixtures found even after I just added a
field to a model.
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 - rein...@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-us...@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.