fix merge and database migrations