add database upgrade from v1