Fix db upgrade from v18 to v19