Having had diabetes during pregnancy is a risk factor for type 2 diabetes.