> I got this error when I added a field to my models, ran sycndb.
>
> I believe I got this error because syncdb failed to actually add the  
> correct column to the database to reflect the changes I had made to  
> my models.
>
> I believe this is a bug in syncdb, but maybe someone more  
> experienced can show me what is wrong?  I had to blow away models  
> and re-sync.. luckily I had no data in, if I had, I would have added  
> the column manually to the database.

It's not a bug in manage.py syncdb: it's tricky to alter tables after  
they have been created (although independent efforts are underway, I  
believe), hence syncdb will not try to do that: 
http://www.djangoproject.com/documentation/django-admin/#syncdb
At least I understand that your 'added a field to my models' means  
adding/creating a new column onto a table in SQL.

I guess Jaap/Bavel got a similar problem below. Unfortunately, you'll  
just have to remove the whole table (including dependencies, which  
includes many2many relations). I just remove the whole (sqlite)  
database and start again with the new model. It's a bit unfortunate  
and elaborate, which just means having sorted your model very  
carefully before deploying it.

If you do this and want to keep the data, best may be to dump the  
data, and then later read it in again (although you may want to do  
that through a script, to stick with the changes you've made to your  
model).



> I cannot figure out what this message might mean; can anybody help?:
>
> OperationError at /admin/balie/lid
> no such column: balie_lid.n
>
> Request method: GET
> Request URL: http://localhost:8000/admin/balie/lid/
> Exception Type: OperationalError
> Exception Value: no such column: balie_lid.n
> Exception Location: D:\Python25\lib\site-packages\django\db\backends
> \sqlite3\base.py in execute, line 93
>
>
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to