chore(migration): avoid unnecessarily calling migration (#967)

This commit is contained in:
Daniel Kaiser 2022-05-18 21:44:53 +02:00 committed by GitHub
parent 185485c336
commit 6a60458135
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1011,7 +1011,7 @@ when isMainModule:
else:
sqliteDatabase = dbRes.value
if not sqliteDatabase.isNil:
if not sqliteDatabase.isNil and (conf.persistPeers or conf.persistMessages):
# Database initialized. Let's set it up
sqliteDatabase.runMigrations(conf) # First migrate what we have