Reputation:
I upgraded Django admin_tools to the latest version 0.5 . And I'm using Django 1.3
Now I am getting this error when I go to admin pages:
OperationalError: (1054, "Unknown column 'admin_tools_dashboard_preferences.dashboard_id' in 'field list'")
There are no instructions mentioned in the documentation for fixing this. What ALTER TABLE should I fire without letting go of the old data?
PS: I do not use South.
Upvotes: 2
Views: 538
Reputation: 4971
If you compare the tables formed before and after upgradation, then you can find the column which is missing and its definition. Just add it by using Alter table
.
alter table admin_tools_dashboard_preferences add column `dashboard_id` varchar(100) NOT NULL;
Using this, the previous data will not only be retained, but the functionality will work too.
Upvotes: 2
Reputation: 3111
After upgrading django admin tools I faced the same problem and ended up dropping tables admin_tools_dashboard_preferences
and admin_tools_menu_bookmark
and recreating them using python manage.py syncdb
. Obviously, it will erase all custom parameters you may set before so make sure you made a backup.
Upvotes: 0