Fix delete local cloud (#251)
This commit is contained in:
parent
7add3e5bed
commit
f39cc8da7c
@ -453,6 +453,10 @@ class UpgradeDatabaseTest {
|
||||
.integer("POSITION", 11) //
|
||||
.executeOn(db)
|
||||
|
||||
Sql.query("CLOUD_ENTITY").executeOn(db).use {
|
||||
Assert.assertThat(it.count, CoreMatchers.`is`(5))
|
||||
}
|
||||
|
||||
Upgrade9To10().applyTo(db, 9)
|
||||
|
||||
Sql.query("VAULT_ENTITY").executeOn(db).use {
|
||||
@ -462,6 +466,9 @@ class UpgradeDatabaseTest {
|
||||
Assert.assertThat(it.getString(it.getColumnIndex("FOLDER_CLOUD_ID")), CoreMatchers.nullValue())
|
||||
}
|
||||
|
||||
Sql.query("CLOUD_ENTITY").executeOn(db).use {
|
||||
Assert.assertThat(it.count, CoreMatchers.`is`(4))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
package org.cryptomator.data.db
|
||||
|
||||
import org.cryptomator.domain.CloudType
|
||||
import org.greenrobot.greendao.database.Database
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
@ -18,8 +17,8 @@ internal class Upgrade9To10 @Inject constructor() : DatabaseUpgrade(9, 10) {
|
||||
.executeOn(db)
|
||||
|
||||
Sql.deleteFrom("CLOUD_ENTITY")
|
||||
.where("FOLDER_CLOUD_ID", Sql.eq(4))
|
||||
.where("TYPE", Sql.eq(CloudType.LOCAL.name))
|
||||
.where("_id", Sql.eq(4))
|
||||
.where("TYPE", Sql.eq("LOCAL"))
|
||||
.executeOn(db)
|
||||
|
||||
db.setTransactionSuccessful()
|
||||
|
Loading…
x
Reference in New Issue
Block a user