From 3920425d377082fac8d4a9695054f603690fa694 Mon Sep 17 00:00:00 2001 From: Fabian Schlenz Date: Thu, 22 Feb 2018 07:58:20 +0100 Subject: [PATCH] Added VACUUMing the database after running the migration in DB_Update_9. --- .../kotlin/de/fabianonline/telegram_backup/DatabaseUpdates.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/kotlin/de/fabianonline/telegram_backup/DatabaseUpdates.kt b/src/main/kotlin/de/fabianonline/telegram_backup/DatabaseUpdates.kt index c448681..583b4a9 100644 --- a/src/main/kotlin/de/fabianonline/telegram_backup/DatabaseUpdates.kt +++ b/src/main/kotlin/de/fabianonline/telegram_backup/DatabaseUpdates.kt @@ -396,5 +396,7 @@ internal class DB_Update_9(conn: Connection, db: Database) : DatabaseUpdate(conn logger.info("Converted ${messages.size} of ${i} messages.") db.saveMessages(messages, api_layer=53, source_type=MessageSource.SUPERGROUP) execute("DELETE FROM messages WHERE id IN (" + messages_to_delete.joinToString() + ")") + println(" Cleaning up the database (this might also take some time, sorry)...") + execute("VACUUM") } }