fixed the database schema and renamed the index