[Android] MediaDatabase: add incremental upgrades
Edward Wang
edward.c.wang at compdigitec.com
Thu Dec 11 07:31:56 CET 2014
On 2014-12-11 02:12, Geoffrey Métais <geoffrey.metais at gmail.com> wrote:
> On Mon, Dec 8, 2014 at 9:41 AM, Edward Wang <git at videolan.org
> <mailto:git at videolan.org>> wrote:
>
> dropMediaTableQuery(db);
> createMediaTableQuery(db);
> }
> + // Upgrade incrementally from oldVersion to newVersion
> + for(int i = oldVersion+1; i <= newVersion; i++) {
>
>
>
> Isn't the database dropped and recreated anyway before the loop?
True, the media table is.
The incremental upgrade is for other tables (such as playlists), which
we don't want dropped every upgrade, because it would wipe out the
user's playlists :)
(I'm still working on the UI and other interfacing parts)
Regards,
Edward Wang
More information about the Android
mailing list