sync data to indexeddb
fix open bug when database already exists