Move code below
This commit is contained in:
parent
18c0f44ff6
commit
0411b3a335
1 changed files with 8 additions and 4 deletions
|
@ -177,15 +177,19 @@ public class GPXDatabase {
|
|||
}
|
||||
if (oldVersion < 3) {
|
||||
db.execSQL("ALTER TABLE " + GPX_TABLE_NAME + " ADD " + GPX_COL_FILE_LAST_MODIFIED_TIME + " long");
|
||||
}
|
||||
|
||||
if (oldVersion < 4) {
|
||||
db.execSQL("ALTER TABLE " + GPX_TABLE_NAME + " ADD " + GPX_COL_SPLIT_TYPE + " int");
|
||||
db.execSQL("ALTER TABLE " + GPX_TABLE_NAME + " ADD " + GPX_COL_SPLIT_INTERVAL + " double");
|
||||
}
|
||||
|
||||
if (oldVersion < 3) {
|
||||
List<GpxDataItem> items = getItems();
|
||||
for (GpxDataItem item : items) {
|
||||
updateLastModifiedTime(item);
|
||||
}
|
||||
}
|
||||
if (oldVersion < 4) {
|
||||
db.execSQL("ALTER TABLE " + GPX_TABLE_NAME + " ADD " + GPX_COL_SPLIT_TYPE + " int");
|
||||
db.execSQL("ALTER TABLE " + GPX_TABLE_NAME + " ADD " + GPX_COL_SPLIT_INTERVAL + " double");
|
||||
}
|
||||
}
|
||||
|
||||
private boolean updateLastModifiedTime(GpxDataItem item) {
|
||||
|
|
Loading…
Reference in a new issue