Fix schema and migration