Skip to content

Commit ce03e7f

Browse files
committed
FM-1363 Fix IllegalArgumentException: column 'lastModifiedTime' does not exist issue update legacy database implementation
1 parent 73f1ffa commit ce03e7f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

app/src/main/java/mega/privacy/android/app/LegacyDatabaseMigrationImpl.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ class LegacyDatabaseMigrationImpl @Inject constructor(
3737
"${SqliteDatabaseHandler.KEY_OFF_PARENT} INTEGER," +
3838
"${SqliteDatabaseHandler.KEY_OFF_TYPE} INTEGER, " +
3939
"${SqliteDatabaseHandler.KEY_OFF_INCOMING} INTEGER, " +
40-
"${SqliteDatabaseHandler.KEY_OFF_HANDLE_INCOMING} INTEGER )"
40+
"${SqliteDatabaseHandler.KEY_OFF_HANDLE_INCOMING} INTEGER, " +
41+
"${SqliteDatabaseHandler.KEY_OFF_LAST_MODIFIED_TIME} INTEGER )"
4142
db.execSQL(CREATE_OFFLINE_TABLE)
4243

4344
val CREATE_CREDENTIALS_TABLE =

app/src/main/java/mega/privacy/android/app/SqliteDatabaseHandler.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2696,8 +2696,9 @@ class SqliteDatabaseHandler @Inject constructor(
26962696
}
26972697

26982698
override fun clearOffline() {
2699-
writableDatabase.execSQL("DROP TABLE IF EXISTS $TABLE_OFFLINE")
2700-
legacyDatabaseMigration.onCreate(writableDatabase)
2699+
runBlocking {
2700+
megaLocalRoomGateway.clearOffline()
2701+
}
27012702
}
27022703

27032704
/**

0 commit comments

Comments
 (0)