Swiftgram/Postbox/PostboxUpgrade_23to24.swift
2019-04-16 19:36:09 +01:00

11 lines
498 B
Swift

import Foundation
func postboxUpgrade_23to24(metadataTable: MetadataTable, valueBox: ValueBox, progress: (Float) -> Void) {
let messageHistoryMetadataTable = ValueBoxTable(id: 10, keyType: .binary, compactValuesOnCreation: true)
let shouldReindexUnreadCountsKey = ValueBoxKey(length: 1)
shouldReindexUnreadCountsKey.setInt8(0, value: 8)
valueBox.set(messageHistoryMetadataTable, key: shouldReindexUnreadCountsKey, value: MemoryBuffer())
metadataTable.setUserVersion(24)
}