Fixed database schema errors