Did you try using the tools.php or w.e to fix the database?