1
0
mirror of https://github.com/chylex/Discord-History-Tracker.git synced 2024-11-25 05:42:45 +01:00

Compare commits

..

2 Commits

Author SHA1 Message Date
5b7312109b
Release v43.1 2024-08-04 21:49:40 +02:00
9f1db9a662
Fix attachment migration error when database contains attachments for deleted messages
Closes #264
2024-08-04 21:47:34 +02:00
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ sealed class SqliteSchemaUpgradeTo9 : ISchemaUpgrade {
await SqliteSchema.CreateMessageAttachmentsTable(conn); await SqliteSchema.CreateMessageAttachmentsTable(conn);
await reporter.MainWork("Migrating message attachments...", 1, 3); await reporter.MainWork("Migrating message attachments...", 1, 3);
await conn.ExecuteAsync("INSERT INTO message_attachments (message_id, attachment_id) SELECT message_id, attachment_id FROM attachments"); await conn.ExecuteAsync("INSERT INTO message_attachments (message_id, attachment_id) SELECT message_id, attachment_id FROM attachments a JOIN messages m USING (message_id)");
await reporter.MainWork("Applying schema changes...", 2, 3); await reporter.MainWork("Applying schema changes...", 2, 3);
await conn.ExecuteAsync("DROP INDEX attachments_message_ix"); await conn.ExecuteAsync("DROP INDEX attachments_message_ix");

View File

@ -8,5 +8,5 @@ using DHT.Utils;
namespace DHT.Utils; namespace DHT.Utils;
static class Version { static class Version {
public const string Tag = "43.0.0.0"; public const string Tag = "43.1.0.0";
} }