在应用程序更新数据库升级

在应用程序更新数据库升级

本文介绍了在应用程序更新数据库升级的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发,它使用Windows Store应用的适用于Windows运行时扩展SQLite的源码网库将数据存储在本地SQLite数据库。该数据库在 Windows.Storage.ApplicationData.Current.LocalFolder.Path 路径创建。
一切工作像它应该和我猜submiting时候我会不会有问题。
搜索结果

I am developing a Windows Store App that uses SQLite for Windows Runtime Extension and sqlite-net library to store data in a local SQLite database. This database is created in Windows.Storage.ApplicationData.Current.LocalFolder.Path path.Everything works like it should and I guess I will not have problems when submiting.

但是,当我改变会发生什么应用程序,再次提交和用户更新呢?
就数据库文件被删除?将用户丢失了他的数据?

But what will happen when I change the app, submit again and the user updates it?Will database file be deleted? Will the user lost his data?

我是否可以使用旧的数据库和升级它的应用程序版本之间?

Will I be able to use the old database and upgrade it between app versions?

我知道如何开发Android应用程序时做的,但这个Windows应用商店的更新过程是新的给我,我怕做了一些错误,这使得我无法恢复用户的数据。如果有人通过它已经走了告诉我它是如何工作的吧。

I know how to do it when developing Android apps but this Windows Store Update process is new to me and I am afraid of doing some mistake that makes me unable to recover users data. If someone has already gone through it tell me how it works please.

在此先感谢

推荐答案

应用程序的数据在持续更新;如果用户卸载应用程序,将只被删除。从:

Application data persists over updates; it would only be deleted if the user uninstalled the application. From Accessing app data with the Windows Runtime:

系统管理数据存储为应用,确保他们远离其他的应用和其他用户隔离。当用户安装更新了自己的应用程序,当你的应用被卸载彻底,干净删除这些数据存储的内容,该系统还保留这些数据存储的内容。

鉴于这种情况,你肯定将有机会获得他们的本地数据库的当前(旧)的版本,所以这将是由你在任何移民建/升级功能的应用程序的一部分。

Given that, you certainly would have access to the current (old) version of their local database, so it would be up to you to build in any migration/upgrade functionality as part of the app.

这篇关于在应用程序更新数据库升级的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 11:59