create index only when updgrade needed