MDL-21781 cohort tables upgrade code