Added VACUUMing the database after running the migration in DB_Update_9.

This commit is contained in:
Fabian Schlenz 2018-02-22 07:58:20 +01:00
parent de354f548d
commit 3920425d37
1 changed files with 2 additions and 0 deletions

View File

@ -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")
}
}