fix migration and schema