Closed link2xt closed 1 week ago
I pushed commit https://github.com/deltachat/deltachat-core-rust/commit/c400491c07c993307f7c8fbbd1f6a0a0b7e1fa64 to main.
Tagged 1.141.1
up to 1.140.2 and from 1.141.1 migration 111 creates table iroh_gossip_peers
in 1.141.0, migration 111 adds column msgs.deleted
, table iroh_gossip_peers
is not created
so, trying to opening a table created by 1.141.0 with 1.141.1 won't be patched but will fail with error (just tried in repl):
Error: failed to run migrations
Caused by:
0: execute_migration failed for version 116
1: duplicate column name: deleted
2: Error code 1: SQL error or missing database
is that okay? desktop/ios/android never used 1.140.0, not sure where else it was really in use.
(migration 112 does not fail as the drop table seems error seems to be ignored silently)
Databases created with 1.141.0 are broken, they don't have iroh_gossip_peers
table and I am not going to try recovering such databases. Nothing was released with core 1.141.0 and it was only there for less than a week.
great, thanks for taking care and for clarifying :)
I scrolled up my terminal. The reason is that merge conflict didn't occur when i rebased this because i didn't add a newline before if dbversion < 111 {
. This is too unreliable. Also it's not convenient to check and fix the db version every time when rebasing. I think it's better to generate the db version automatically. Then it will not be seen in the code, but it can be logged unconditionally.
We have two migrations with the same number: https://github.com/deltachat/deltachat-core-rust/blob/72a1406b86e5dc5ee1a0b89bd20a92ee47e29bb4/src/sql/migrations.rs#L910-L926
It seems broken migration was introduced in 13f58e0ca54d2eb849005265417d71de0b842b01 Essentially it is https://github.com/deltachat/deltachat-core-rust/pull/5382 merged incorrectly.
We should assign it a new number now I guess.
Release 1.141.0 is broken, I will assign this migration a new number and release 1.141.1.