exceptions handling by migrations