Fixed an issue where the 'message trimming' setting wouldn't get set to on by default if there was no legacy database

pull/612/head
Morgan Pretty 3 years ago
parent 9b10944567
commit fd76438686

@ -18,6 +18,9 @@ enum _003_YDBToGRDBMigration: Migration {
static func migrate(_ db: Database) throws {
guard let dbConnection: YapDatabaseConnection = SUKLegacy.newDatabaseConnection() else {
// We want this setting to be on by default (even if there isn't a legacy database)
db[.trimOpenGroupMessagesOlderThanSixMonths] = true
SNLog("[Migration Warning] No legacy database, skipping \(target.key(with: self))")
return
}

Loading…
Cancel
Save