2022-04-06 07:43:26 +02:00
|
|
|
// Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
|
|
|
|
|
2022-03-31 02:47:09 +02:00
|
|
|
import Foundation
|
2023-07-13 09:57:08 +02:00
|
|
|
import GRDB
|
2022-03-31 02:47:09 +02:00
|
|
|
import SessionUtilitiesKit
|
2020-11-05 02:07:21 +01:00
|
|
|
|
2023-07-13 09:57:08 +02:00
|
|
|
public enum SNSnodeKit: MigratableTarget { // Just to make the external API nice
|
2023-10-03 03:52:29 +02:00
|
|
|
public static func migrations() -> TargetMigrations {
|
2022-03-31 02:47:09 +02:00
|
|
|
return TargetMigrations(
|
|
|
|
identifier: .snodeKit,
|
|
|
|
migrations: [
|
|
|
|
[
|
2022-04-27 02:48:54 +02:00
|
|
|
_001_InitialSetupMigration.self,
|
|
|
|
_002_SetupStandardJobs.self
|
2023-10-06 09:03:12 +02:00
|
|
|
], // Initial DB Creation
|
2022-03-31 02:47:09 +02:00
|
|
|
[
|
2022-04-27 02:48:54 +02:00
|
|
|
_003_YDBToGRDBMigration.self
|
2023-10-06 09:03:12 +02:00
|
|
|
], // YDB to GRDB Migration
|
2022-10-14 08:09:38 +02:00
|
|
|
[
|
|
|
|
_004_FlagMessageHashAsDeletedOrInvalid.self
|
2023-10-06 09:03:12 +02:00
|
|
|
], // Legacy DB removal
|
|
|
|
[], // Add job priorities
|
|
|
|
[], // Fix thread FTS
|
|
|
|
[
|
|
|
|
_005_AddSnodeReveivedMessageInfoPrimaryKey.self
|
|
|
|
]
|
2022-03-31 02:47:09 +02:00
|
|
|
]
|
|
|
|
)
|
|
|
|
}
|
2020-11-05 02:07:21 +01:00
|
|
|
|
2022-04-01 08:22:45 +02:00
|
|
|
public static func configure() {
|
2022-04-27 02:48:54 +02:00
|
|
|
// Configure the job executors
|
2023-04-05 08:49:38 +02:00
|
|
|
JobRunner.setExecutor(GetSnodePoolJob.self, for: .getSnodePool)
|
2020-11-05 02:07:21 +01:00
|
|
|
}
|
|
|
|
}
|