Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
50dbffd
Renamed SessionSnodeKit to SessionNetworkingKit
mpretty-cyro Aug 7, 2025
baafb92
Fixed some missing renames
mpretty-cyro Aug 7, 2025
4ae24f8
Fixed a couple of build issues
mpretty-cyro Aug 7, 2025
08d01a5
Moved all migrations into one target, simplified migration logic
mpretty-cyro Aug 8, 2025
994be24
[WIP] Initial work on integrated refactored libSession networking
mpretty-cyro Aug 8, 2025
cb6b5aa
Fixed a few issues
mpretty-cyro Aug 8, 2025
ad42281
Made a bunch of QoL changes
mpretty-cyro Aug 22, 2025
d14cf60
Removed a redundant extension
mpretty-cyro Aug 22, 2025
43585db
Added an event to notify of any conversation deletion
mpretty-cyro Aug 22, 2025
2adac28
Added code to schedule a missing recurring job (could be lost)
mpretty-cyro Aug 22, 2025
dc24dca
Removed database usage from SnodeAPI
mpretty-cyro Aug 22, 2025
8fc4ed2
Updated actor-based networking wrapper
mpretty-cyro Aug 25, 2025
baee6a3
Updated the SessionNetworkScreen to use async/await and ObservationMa…
mpretty-cyro Aug 26, 2025
ecc472b
Updated path status observations to use async/await
mpretty-cyro Aug 26, 2025
ae9e35b
Added some missing SessionNetworkScreen changes
mpretty-cyro Aug 26, 2025
c386223
Refactored 'SwarmDrainBehaviour' into 'SwarmDrainer'
mpretty-cyro Aug 26, 2025
bb9bfb1
Cleaned up the SnodeAPI, updated getSessionId to async/await
mpretty-cyro Aug 26, 2025
266d142
Refactored the PushNotificationAPI to be async/await
mpretty-cyro Aug 26, 2025
fb9c224
Updated NukeDataModel to do some async/await
mpretty-cyro Aug 26, 2025
99f5b88
Initial dev settings screen updates
mpretty-cyro Aug 26, 2025
04ba13c
Rework AppSetup process to be async/await
mpretty-cyro Aug 26, 2025
d44704b
Refactored the CheckForAppUpdatesJob to use async/await
mpretty-cyro Aug 26, 2025
da6c4d4
Updated usage of the getSessionId function
mpretty-cyro Aug 26, 2025
922218f
Odds and ends
mpretty-cyro Aug 26, 2025
ecf3e82
Refactored Onboarding to be an actor and use async/await
mpretty-cyro Aug 26, 2025
5f0ad10
Merge remote-tracking branch 'upstream/dev' into feature/refactored-n…
mpretty-cyro Aug 27, 2025
da39851
Moved network settings to it's own screen, added devnet support
mpretty-cyro Aug 27, 2025
4b41a29
Fixed an issue where the libSession loggers weren't setup correctly
mpretty-cyro Aug 27, 2025
4bbee07
Fixed a couple of networking bugs
mpretty-cyro Aug 28, 2025
7e7c969
Merge remote-tracking branch 'upstream/dev' into feature/refactored-n…
mpretty-cyro Sep 2, 2025
98bcadb
Fixed an issue where attachment files may not get deleted immediately
mpretty-cyro Sep 2, 2025
7893944
Fixed build issues and bumped version number
mpretty-cyro Sep 2, 2025
e848640
Fixed some issues with archiving `Compile_LibSessionUtil` builds
mpretty-cyro Sep 3, 2025
ca4c763
Fixed a bug where we weren't excluding the prefix when getting a swar…
mpretty-cyro Sep 3, 2025
5bed51e
Fixed an issue where combine streams which sent requests would never …
mpretty-cyro Sep 3, 2025
8d41ab4
Fixed a couple of issues found when testing
mpretty-cyro Sep 4, 2025
a728a95
Fixed an issue where group creation was broken
mpretty-cyro Sep 4, 2025
aae7bfe
Updated mocking setup, working through fixing tests
mpretty-cyro Sep 5, 2025
2d0d88c
Fixed unit test build errors (tests still broken)
mpretty-cyro Sep 8, 2025
b6086c1
Fixed a number of test crashes, updated MockCrypto to be Mockable
mpretty-cyro Sep 8, 2025
6606ffa
Added dev setting to configure router, fixed a couple of other issues
mpretty-cyro Sep 9, 2025
d0f3cf9
Fixed an issue where settings could be set before the local config ex…
mpretty-cyro Sep 9, 2025
5eb99ed
Updated MockNotificationsManager to use new Mockable convention (was …
mpretty-cyro Sep 9, 2025
85184ba
Fixed a bunch of broke unit tests (still some left)
mpretty-cyro Sep 10, 2025
2ad95f4
Updated MockGeneralCache and MockUserDefaults to use new Mockable
mpretty-cyro Sep 10, 2025
04fb9d4
Fixed a few more tests and updated more code to the new mocking system
mpretty-cyro Sep 10, 2025
b596de2
Fixed more failing unit tests, updated more mock types to Mockable
mpretty-cyro Sep 11, 2025
20feb15
Finished fixing up broken tests
mpretty-cyro Sep 14, 2025
fa51244
Fixes for SOGS downloads and network status observations
mpretty-cyro Sep 16, 2025
cec5d80
Merge remote-tracking branch 'upstream/dev' into feature/refactored-n…
mpretty-cyro Sep 17, 2025
6381a34
Removed the legacy get/send message requests
mpretty-cyro Sep 17, 2025
63f17a5
Refactored the OGMCache to be part of the OpenGroupManager
mpretty-cyro Sep 17, 2025
6a89039
Renamed Network.SnodeAPI to Network.StorageServer for consistency
mpretty-cyro Sep 17, 2025
a828c86
Removed StorageServerCache, cleaning up DSL, async/await tweaks
mpretty-cyro Sep 18, 2025
b35e48c
Fixed broken tests
mpretty-cyro Sep 18, 2025
2eeed6b
Enabled "Direct" routing mode, fixed a bug from network offset changes
mpretty-cyro Sep 22, 2025
fe1515c
Merge remote-tracking branch 'upstream/dev' into feature/refactored-n…
mpretty-cyro Sep 23, 2025
3662c69
Fixed issues from merge
mpretty-cyro Sep 23, 2025
2dc3bfc
Fixes for a few issues that cropped up during testing
mpretty-cyro Sep 24, 2025
fee13a0
Merge remote-tracking branch 'upstream/dev' into feature/refactored-n…
mpretty-cyro Sep 24, 2025
0cb8665
Bumped build number
mpretty-cyro Sep 24, 2025
889e5e8
Better iOS 15 support for network changes
mpretty-cyro Sep 25, 2025
502b166
Minor copy and warning tweaks
mpretty-cyro Sep 30, 2025
1c2cf98
Merge remote-tracking branch 'upstream/dev' into feature/refactored-n…
mpretty-cyro Sep 30, 2025
6f8c3d3
Bumped build number
mpretty-cyro Sep 30, 2025
1910708
Renamed Lokinet to SessionRouter
mpretty-cyro Feb 3, 2026
7d0563d
Updated request categories for latest code
mpretty-cyro Feb 3, 2026
af2e90e
Missed a couple of categories, added some dev settings for network co…
mpretty-cyro Feb 4, 2026
490ac8f
Merge remote-tracking branch 'upstream/dev' into feature/refactored-n…
mpretty-cyro Feb 6, 2026
e9c08e3
Fixed build issues, other minor tweaks
mpretty-cyro Feb 9, 2026
f55778d
Cleaned up a bunch of code
mpretty-cyro Feb 9, 2026
9712d6b
Fixed a few issues found while testing, cleaned up some code
mpretty-cyro Feb 10, 2026
70e218c
Refactored failure toasts for group invites/promotions to async/await
mpretty-cyro Feb 10, 2026
211da1e
Added code to remove a false warning from the logs
mpretty-cyro Feb 10, 2026
1a8bf66
Cleaned up a little code
mpretty-cyro Feb 10, 2026
63bd8a0
Updates to support latest libSession network changes
mpretty-cyro Feb 20, 2026
71e02a1
Fixed a couple of memory leaks, a swift warning and logs
mpretty-cyro Feb 20, 2026
7f0b3ee
Fix bug where home screen settings button wouldn't update correctly
mpretty-cyro Feb 22, 2026
ed80f41
Simplified Network.PreparedRequest and cleaned up message sender logic
mpretty-cyro Feb 23, 2026
a87bc3f
Fixed unit tests and issues uncovered during testing
mpretty-cyro Feb 25, 2026
1a3c6db
Updated to latest libSession, fixed crashes and unit tests
mpretty-cyro Feb 26, 2026
2d5d719
Removed CChar45 (no longer needed)
mpretty-cyro Feb 26, 2026
87bc82b
Merge remote-tracking branch 'upstream/dev' into feature/refactored-n…
mpretty-cyro Feb 26, 2026
1e1b6d6
Merge remote-tracking branch 'upstream/dev' into feature/refactored-n…
mpretty-cyro Feb 27, 2026
7f4cc1a
Fixed build error
mpretty-cyro Feb 27, 2026
ea4ee5e
Added static node list as a fallback option when failing to bootstrap
mpretty-cyro Feb 27, 2026
39a1610
Fixed a bug where the users display name and picture could be removed
mpretty-cyro Feb 27, 2026
0c0c32c
Fixed a crash when swapping between network routers
mpretty-cyro Feb 27, 2026
c78a56b
Added handing for a couple of libSession network errors
mpretty-cyro Mar 2, 2026
036d56f
Fixed a couple of bugs found when testing
mpretty-cyro Mar 2, 2026
4f4a188
Fixed some linker issues
mpretty-cyro Mar 5, 2026
c5c4b41
Fix CI build errors
mpretty-cyro Mar 5, 2026
61cd3a3
More CI fixes
mpretty-cyro Mar 5, 2026
03a994e
[raw] Added support for 'raw' arg in commit message to disable log be…
mpretty-cyro Mar 5, 2026
2e05bc5
[raw] Tweaks to previous change
mpretty-cyro Mar 5, 2026
ad77ca3
[raw] Just removed the drone side of the change
mpretty-cyro Mar 5, 2026
a8fb32f
[raw] debugging new command
mpretty-cyro Mar 5, 2026
f5f4387
[raw] Tweaks for new command detection
mpretty-cyro Mar 5, 2026
3d85d26
[raw] Tweaks to resilience tests to fix CI compiler crash
mpretty-cyro Mar 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Moved all migrations into one target, simplified migration logic
  • Loading branch information
mpretty-cyro committed Aug 20, 2025
commit 08d01a52ec379f792e3b1a78ea1c40bda20394ce
386 changes: 182 additions & 204 deletions Session.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions Session/Meta/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
self.loadingViewController = LoadingViewController()

AppSetup.setupEnvironment(
additionalMigrationTargets: [DeprecatedUIKitMigrationTarget.self],
appSpecificBlock: { [dependencies] in
Log.setup(with: Logger(primaryPrefix: "Session", using: dependencies))
Log.info(.cat, "Setting up environment.")
Expand Down Expand Up @@ -222,7 +221,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
// Dispatch async so things can continue to be progressed if a migration does need to run
DispatchQueue.global(qos: .userInitiated).async { [weak self, dependencies] in
AppSetup.runPostSetupMigrations(
additionalMigrationTargets: [DeprecatedUIKitMigrationTarget.self],
migrationProgressChanged: { progress, minEstimatedTotalTime in
self?.loadingViewController?.updateProgress(
progress: progress,
Expand Down Expand Up @@ -606,7 +604,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD

// The re-run the migration (should succeed since there is no data)
AppSetup.runPostSetupMigrations(
additionalMigrationTargets: [DeprecatedUIKitMigrationTarget.self],
migrationProgressChanged: { [weak self] progress, minEstimatedTotalTime in
self?.loadingViewController?.updateProgress(
progress: progress,
Expand Down
99 changes: 47 additions & 52 deletions SessionMessagingKit/Configuration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,58 +2,53 @@ import Foundation
import GRDB
import SessionUtilitiesKit

public enum SNMessagingKit: MigratableTarget { // Just to make the external API nice
public static func migrations() -> TargetMigrations {
return TargetMigrations(
identifier: .messagingKit,
migrations: [
[
_001_InitialSetupMigration.self,
_002_SetupStandardJobs.self
], // Initial DB Creation
[
_003_YDBToGRDBMigration.self
], // YDB to GRDB Migration
[
_004_RemoveLegacyYDB.self
], // Legacy DB removal
[
_005_FixDeletedMessageReadState.self,
_006_FixHiddenModAdminSupport.self,
_007_HomeQueryOptimisationIndexes.self
], // Add job priorities
[
_008_EmojiReacts.self,
_009_OpenGroupPermission.self,
_010_AddThreadIdToFTS.self
], // Fix thread FTS
[
_011_AddPendingReadReceipts.self,
_012_AddFTSIfNeeded.self,
_013_SessionUtilChanges.self,
_014_GenerateInitialUserConfigDumps.self,
_015_BlockCommunityMessageRequests.self,
_016_MakeBrokenProfileTimestampsNullable.self,
_017_RebuildFTSIfNeeded_2_4_5.self,
_018_DisappearingMessagesConfiguration.self,
_019_ScheduleAppUpdateCheckJob.self,
_020_AddMissingWhisperFlag.self,
_021_ReworkRecipientState.self,
_022_GroupsRebuildChanges.self,
_023_GroupsExpiredFlag.self,
_024_FixBustedInteractionVariant.self,
_025_DropLegacyClosedGroupKeyPairTable.self,
_026_MessageDeduplicationTable.self
],
[], // Renamed `Setting` to `KeyValueStore`
[
_027_MoveSettingsToLibSession.self,
_028_RenameAttachments.self,
_029_AddProMessageFlag.self
]
]
)
}
public enum SNMessagingKit { // Just to make the external API nice
public static let migrations: [Migration.Type] = [
_001_SUK_InitialSetupMigration.self,
_002_SUK_SetupStandardJobs.self,
_003_SUK_YDBToGRDBMigration.self,
_004_SNK_InitialSetupMigration.self,
_005_SNK_SetupStandardJobs.self,
_006_SMK_InitialSetupMigration.self,
_007_SMK_SetupStandardJobs.self,
_008_SNK_YDBToGRDBMigration.self,
_009_SMK_YDBToGRDBMigration.self,
_010_FlagMessageHashAsDeletedOrInvalid.self,
_011_RemoveLegacyYDB.self,
_012_AddJobPriority.self,
_013_FixDeletedMessageReadState.self,
_014_FixHiddenModAdminSupport.self,
_015_HomeQueryOptimisationIndexes.self,
_016_ThemePreferences.self,
_017_EmojiReacts.self,
_018_OpenGroupPermission.self,
_019_AddThreadIdToFTS.self,
_020_AddJobUniqueHash.self,
_021_AddSnodeReveivedMessageInfoPrimaryKey.self,
_022_DropSnodeCache.self,
_023_SplitSnodeReceivedMessageInfo.self,
_024_ResetUserConfigLastHashes.self,
_025_AddPendingReadReceipts.self,
_026_AddFTSIfNeeded.self,
_027_SessionUtilChanges.self,
_028_GenerateInitialUserConfigDumps.self,
_029_BlockCommunityMessageRequests.self,
_030_MakeBrokenProfileTimestampsNullable.self,
_031_RebuildFTSIfNeeded_2_4_5.self,
_032_DisappearingMessagesConfiguration.self,
_033_ScheduleAppUpdateCheckJob.self,
_034_AddMissingWhisperFlag.self,
_035_ReworkRecipientState.self,
_036_GroupsRebuildChanges.self,
_037_GroupsExpiredFlag.self,
_038_FixBustedInteractionVariant.self,
_039_DropLegacyClosedGroupKeyPairTable.self,
_040_MessageDeduplicationTable.self,
_041_RenameTableSettingToKeyValueStore.self,
_042_MoveSettingsToLibSession.self,
_043_RenameAttachments.self,
_044_AddProMessageFlag.self
]

public static func configure(using dependencies: Dependencies) {
// Configure the job executors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

import Foundation
import GRDB
import SessionUtilitiesKit

enum _001_InitialSetupMigration: Migration {
static let target: TargetMigrations.Identifier = .utilitiesKit
static let identifier: String = "initialSetup"
enum _001_SUK_InitialSetupMigration: Migration {
static let identifier: String = "utilitiesKit.initialSetup"
static let minExpectedRunDuration: TimeInterval = 0.1
static let createdTables: [(TableRecord & FetchableRecord).Type] = [
Identity.self, Job.self, JobDependencies.self
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

import Foundation
import GRDB
import SessionUtilitiesKit

/// This migration sets up the standard jobs, since we want these jobs to run before any "once-off" jobs we do this migration
/// before running the `YDBToGRDBMigration`
enum _002_SetupStandardJobs: Migration {
static let target: TargetMigrations.Identifier = .utilitiesKit
static let identifier: String = "SetupStandardJobs"
enum _002_SUK_SetupStandardJobs: Migration {
static let identifier: String = "utilitiesKit.SetupStandardJobs"
static let minExpectedRunDuration: TimeInterval = 0.1
static let createdTables: [(TableRecord & FetchableRecord).Type] = []

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ import Foundation
import GRDB
import SessionUtilitiesKit

enum _003_YDBToGRDBMigration: Migration {
static let target: TargetMigrations.Identifier = .networkingKit
static let identifier: String = "YDBToGRDBMigration"
enum _003_SUK_YDBToGRDBMigration: Migration {
static let identifier: String = "utilitiesKit.YDBToGRDBMigration"
static let minExpectedRunDuration: TimeInterval = 0.1
static let createdTables: [(TableRecord & FetchableRecord).Type] = []

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ import Foundation
import GRDB
import SessionUtilitiesKit

enum _001_InitialSetupMigration: Migration {
static let target: TargetMigrations.Identifier = .networkingKit
static let identifier: String = "initialSetup"
enum _004_SNK_InitialSetupMigration: Migration {
static let identifier: String = "snodeKit.initialSetup"
static let minExpectedRunDuration: TimeInterval = 0.1
static let createdTables: [(TableRecord & FetchableRecord).Type] = []

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ import SessionUtilitiesKit

/// This migration sets up the standard jobs, since we want these jobs to run before any "once-off" jobs we do this migration
/// before running the `YDBToGRDBMigration`
enum _002_SetupStandardJobs: Migration {
static let target: TargetMigrations.Identifier = .networkingKit
static let identifier: String = "SetupStandardJobs"
enum _005_SNK_SetupStandardJobs: Migration {
static let identifier: String = "snodeKit.SetupStandardJobs"
static let minExpectedRunDuration: TimeInterval = 0.1
static let createdTables: [(TableRecord & FetchableRecord).Type] = []

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ import Foundation
import GRDB
import SessionUtilitiesKit

enum _001_InitialSetupMigration: Migration {
static let target: TargetMigrations.Identifier = .messagingKit
static let identifier: String = "initialSetup"
enum _006_SMK_InitialSetupMigration: Migration {
static let identifier: String = "messagingKit.initialSetup"
static let minExpectedRunDuration: TimeInterval = 0.1
static let createdTables: [(TableRecord & FetchableRecord).Type] = [
Contact.self, Profile.self, SessionThread.self, DisappearingMessagesConfiguration.self,
Expand Down Expand Up @@ -59,7 +58,7 @@ enum _001_InitialSetupMigration: Migration {
/// Create a full-text search table synchronized with the Profile table
try db.create(virtualTable: "profile_fts", using: FTS5()) { t in
t.synchronize(withTable: "profile")
t.tokenizer = _001_InitialSetupMigration.fullTextSearchTokenizer
t.tokenizer = _006_SMK_InitialSetupMigration.fullTextSearchTokenizer

t.column("nickname")
t.column("name")
Expand Down Expand Up @@ -106,7 +105,7 @@ enum _001_InitialSetupMigration: Migration {
/// Create a full-text search table synchronized with the ClosedGroup table
try db.create(virtualTable: "closedGroup_fts", using: FTS5()) { t in
t.synchronize(withTable: "closedGroup")
t.tokenizer = _001_InitialSetupMigration.fullTextSearchTokenizer
t.tokenizer = _006_SMK_InitialSetupMigration.fullTextSearchTokenizer

t.column("name")
}
Expand Down Expand Up @@ -157,7 +156,7 @@ enum _001_InitialSetupMigration: Migration {
/// Create a full-text search table synchronized with the OpenGroup table
try db.create(virtualTable: "openGroup_fts", using: FTS5()) { t in
t.synchronize(withTable: "openGroup")
t.tokenizer = _001_InitialSetupMigration.fullTextSearchTokenizer
t.tokenizer = _006_SMK_InitialSetupMigration.fullTextSearchTokenizer

t.column("name")
}
Expand Down Expand Up @@ -268,7 +267,7 @@ enum _001_InitialSetupMigration: Migration {
/// Create a full-text search table synchronized with the Interaction table
try db.create(virtualTable: "interaction_fts", using: FTS5()) { t in
t.synchronize(withTable: "interaction")
t.tokenizer = _001_InitialSetupMigration.fullTextSearchTokenizer
t.tokenizer = _006_SMK_InitialSetupMigration.fullTextSearchTokenizer

t.column("body")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ import SessionNetworkingKit

/// This migration sets up the standard jobs, since we want these jobs to run before any "once-off" jobs we do this migration
/// before running the `YDBToGRDBMigration`
enum _002_SetupStandardJobs: Migration {
static let target: TargetMigrations.Identifier = .messagingKit
static let identifier: String = "SetupStandardJobs"
enum _007_SMK_SetupStandardJobs: Migration {
static let identifier: String = "messagingKit.SetupStandardJobs"
static let minExpectedRunDuration: TimeInterval = 0.1
static let createdTables: [(TableRecord & FetchableRecord).Type] = []

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import Foundation
import GRDB
import SessionUtilitiesKit

enum _003_YDBToGRDBMigration: Migration {
static let target: TargetMigrations.Identifier = .utilitiesKit
static let identifier: String = "YDBToGRDBMigration"
enum _008_SNK_YDBToGRDBMigration: Migration {
static let identifier: String = "snodeKit.YDBToGRDBMigration"
static let minExpectedRunDuration: TimeInterval = 0.1
static let createdTables: [(TableRecord & FetchableRecord).Type] = []

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ import Foundation
import GRDB
import SessionUtilitiesKit

enum _003_YDBToGRDBMigration: Migration {
static let target: TargetMigrations.Identifier = .messagingKit
static let identifier: String = "YDBToGRDBMigration"
enum _009_SMK_YDBToGRDBMigration: Migration {
static let identifier: String = "messagingKit.YDBToGRDBMigration"
static let minExpectedRunDuration: TimeInterval = 0.1
static let createdTables: [(TableRecord & FetchableRecord).Type] = []

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ import SessionUtilitiesKit
/// This migration adds a flag to the `SnodeReceivedMessageInfo` so that when deleting interactions we can
/// ignore their hashes when subsequently trying to fetch new messages (which results in the storage server returning
/// messages from the beginning of time)
enum _004_FlagMessageHashAsDeletedOrInvalid: Migration {
static let target: TargetMigrations.Identifier = .networkingKit
static let identifier: String = "FlagMessageHashAsDeletedOrInvalid"
enum _010_FlagMessageHashAsDeletedOrInvalid: Migration {
static let identifier: String = "snodeKit.FlagMessageHashAsDeletedOrInvalid"
static let minExpectedRunDuration: TimeInterval = 0.2
static let createdTables: [(TableRecord & FetchableRecord).Type] = []

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ import SessionUtilitiesKit
import SessionNetworkingKit

/// This migration used to remove the legacy YapDatabase files (the old logic has been removed and is no longer supported so it now does nothing)
enum _004_RemoveLegacyYDB: Migration {
static let target: TargetMigrations.Identifier = .messagingKit
static let identifier: String = "RemoveLegacyYDB"
enum _011_RemoveLegacyYDB: Migration {
static let identifier: String = "messagingKit.RemoveLegacyYDB"
static let minExpectedRunDuration: TimeInterval = 0.1
static let createdTables: [(TableRecord & FetchableRecord).Type] = []

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import Foundation
import GRDB
import SessionUtilitiesKit

enum _004_AddJobPriority: Migration {
static let target: TargetMigrations.Identifier = .utilitiesKit
static let identifier: String = "AddJobPriority"
enum _012_AddJobPriority: Migration {
static let identifier: String = "utilitiesKit.AddJobPriority"
static let minExpectedRunDuration: TimeInterval = 0.1
static let createdTables: [(TableRecord & FetchableRecord).Type] = []

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ import GRDB
import SessionUtilitiesKit

/// This migration fixes a bug where certain message variants could incorrectly be counted as unread messages
enum _005_FixDeletedMessageReadState: Migration {
static let target: TargetMigrations.Identifier = .messagingKit
static let identifier: String = "FixDeletedMessageReadState"
enum _013_FixDeletedMessageReadState: Migration {
static let identifier: String = "messagingKit.FixDeletedMessageReadState"
static let minExpectedRunDuration: TimeInterval = 0.01
static let createdTables: [(TableRecord & FetchableRecord).Type] = []

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ import SessionUtilitiesKit

/// This migration fixes an issue where hidden mods/admins weren't getting recognised as mods/admins, it reset's the `info_updates`
/// for open groups so they will fully re-fetch their mod/admin lists
enum _006_FixHiddenModAdminSupport: Migration {
static let target: TargetMigrations.Identifier = .messagingKit
static let identifier: String = "FixHiddenModAdminSupport"
enum _014_FixHiddenModAdminSupport: Migration {
static let identifier: String = "messagingKit.FixHiddenModAdminSupport"
static let minExpectedRunDuration: TimeInterval = 0.01
static let createdTables: [(TableRecord & FetchableRecord).Type] = []

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ import GRDB
import SessionUtilitiesKit

/// This migration adds an index to the interaction table in order to improve the performance of retrieving the number of unread interactions
enum _007_HomeQueryOptimisationIndexes: Migration {
static let target: TargetMigrations.Identifier = .messagingKit
static let identifier: String = "HomeQueryOptimisationIndexes"
enum _015_HomeQueryOptimisationIndexes: Migration {
static let identifier: String = "messagingKit.HomeQueryOptimisationIndexes"
static let minExpectedRunDuration: TimeInterval = 0.01
static let createdTables: [(TableRecord & FetchableRecord).Type] = []

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ import SessionUtilitiesKit
/// **Note:** This migration used to live within `SessionUIKit` but we wanted to isolate it and remove dependencies from it so we
/// needed to extract this migration into the `Session` and `SessionShareExtension` targets (since both need theming they both
/// need to provide this migration as an option during setup)
enum _001_ThemePreferences: Migration {
static let target: TargetMigrations.Identifier = ._deprecatedUIKit
static let identifier: String = "ThemePreferences"
enum _016_ThemePreferences: Migration {
static let identifier: String = "uiKit.ThemePreferences"
static let minExpectedRunDuration: TimeInterval = 0.1
static let createdTables: [(TableRecord & FetchableRecord).Type] = []

Expand Down Expand Up @@ -86,25 +85,3 @@ private extension Theme.PrimaryColor {
}
}
}

enum DeprecatedUIKitMigrationTarget: MigratableTarget {
public static func migrations() -> TargetMigrations {
return TargetMigrations(
identifier: ._deprecatedUIKit,
migrations: [
// Want to ensure the initial DB stuff has been completed before doing any
// SNUIKit migrations
[], // Initial DB Creation
[], // YDB to GRDB Migration
[], // Legacy DB removal
[
_001_ThemePreferences.self
], // Add job priorities
[], // Fix thread FTS
[],
[], // Renamed `Setting` to `KeyValueStore`
[]
]
)
}
}
Loading