Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ abstract class NextcloudDatabase : RoomDatabase() {
abstract fun fileDao(): FileDao

companion object {
const val FIRST_ROOM_DB_VERSION = 65
// NMC customization
// NMC play store version 7.21.9 had db version 64 before SqLite to Room migration
// Keeping it 65(as per NC) will lead to crash when user tried to upgrade the app
const val FIRST_ROOM_DB_VERSION = 64
private var instance: NextcloudDatabase? = null

@JvmStatic
Expand Down
14 changes: 14 additions & 0 deletions app/src/test/java/com/nmc/DatabaseVersionTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.nmc

import com.nextcloud.client.database.NextcloudDatabase
import org.junit.Test

class DatabaseVersionTest {

@Test
fun validateDatabaseVersion() {
//for NMC the version will start from 64 only
//validating via test case to check if any test changes done during rebasing or merging
assert(64 == NextcloudDatabase.FIRST_ROOM_DB_VERSION)
}
}