pre upgrade function store