fix: Correctly migrate to database v11 by adding a revision date
This commit is contained in:
parent
1c916ffacc
commit
ad4a94cddd
|
@ -155,7 +155,7 @@ class DatabaseManagerImpl(
|
||||||
sql = "SELECT data FROM cipher",
|
sql = "SELECT data FROM cipher",
|
||||||
mapper = { cursor ->
|
mapper = { cursor ->
|
||||||
val ciphers = sequence<BitwardenCipher> {
|
val ciphers = sequence<BitwardenCipher> {
|
||||||
while (!cursor.next().value) {
|
while (cursor.next().value) {
|
||||||
val cipher = kotlin.run {
|
val cipher = kotlin.run {
|
||||||
val data = cursor.getString(0)!!
|
val data = cursor.getString(0)!!
|
||||||
bitwardenCipherToStringAdapter.decode(data)
|
bitwardenCipherToStringAdapter.decode(data)
|
||||||
|
@ -168,7 +168,6 @@ class DatabaseManagerImpl(
|
||||||
parameters = 0,
|
parameters = 0,
|
||||||
).value
|
).value
|
||||||
ciphers.forEach { cipher ->
|
ciphers.forEach { cipher ->
|
||||||
println("migrated = ${cipher.cipherId}")
|
|
||||||
val sql = "UPDATE cipher SET updatedAt = ? WHERE cipherId = ?"
|
val sql = "UPDATE cipher SET updatedAt = ? WHERE cipherId = ?"
|
||||||
driver.execute(
|
driver.execute(
|
||||||
identifier = null,
|
identifier = null,
|
||||||
|
|
Loading…
Reference in New Issue