Updated project for migration, fixed bad sql.