sql: Add migration for bad message-id data in the database
This commit is contained in:
parent
d280bcbbeb
commit
33801f22ef
2 changed files with 8 additions and 1 deletions
7
sql/version-027.sql
Normal file
7
sql/version-027.sql
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
--
|
||||||
|
-- Rebuild corrupted message ids.
|
||||||
|
--
|
||||||
|
|
||||||
|
UPDATE MessageTable
|
||||||
|
SET message_id = '<' || message_id || '>'
|
||||||
|
WHERE (message_id NOT LIKE '<%') AND (message_id NOT LIKE ' <%');
|
||||||
|
|
@ -107,7 +107,7 @@ class Geary.ImapDB.DatabaseTest : TestCase {
|
||||||
);
|
);
|
||||||
db.open.end(async_result());
|
db.open.end(async_result());
|
||||||
|
|
||||||
assert_equal<int?>(db.get_schema_version(), 26, "Post-upgrade version");
|
assert_equal<int?>(db.get_schema_version(), 27, "Post-upgrade version");
|
||||||
|
|
||||||
// Since schema v22 deletes the re-creates all attachments,
|
// Since schema v22 deletes the re-creates all attachments,
|
||||||
// attachment 12 should no longer exist on the file system and
|
// attachment 12 should no longer exist on the file system and
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue