|
|
|
@ -19,35 +19,22 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
|
|
@implementation OWSDatabaseMigrationRunner
|
|
|
|
|
|
|
|
|
|
- (instancetype)initWithPrimaryStorage:(OWSPrimaryStorage *)primaryStorage
|
|
|
|
|
{
|
|
|
|
|
self = [super init];
|
|
|
|
|
if (!self) {
|
|
|
|
|
return self;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_primaryStorage = primaryStorage;
|
|
|
|
|
|
|
|
|
|
return self;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// This should all migrations which do NOT qualify as safeBlockingMigrations:
|
|
|
|
|
- (NSArray<OWSDatabaseMigration *> *)allMigrations
|
|
|
|
|
{
|
|
|
|
|
OWSPrimaryStorage *primaryStorage = OWSPrimaryStorage.sharedManager;
|
|
|
|
|
return @[
|
|
|
|
|
[[OWS100RemoveTSRecipientsMigration alloc] initWithPrimaryStorage:primaryStorage],
|
|
|
|
|
[[OWS102MoveLoggingPreferenceToUserDefaults alloc] initWithPrimaryStorage:primaryStorage],
|
|
|
|
|
[[OWS103EnableVideoCalling alloc] initWithPrimaryStorage:primaryStorage],
|
|
|
|
|
[[OWS104CreateRecipientIdentities alloc] initWithPrimaryStorage:primaryStorage],
|
|
|
|
|
[[OWS105AttachmentFilePaths alloc] initWithPrimaryStorage:primaryStorage],
|
|
|
|
|
[[OWS106EnsureProfileComplete alloc] initWithPrimaryStorage:primaryStorage],
|
|
|
|
|
[[OWS107LegacySounds alloc] initWithPrimaryStorage:primaryStorage],
|
|
|
|
|
[[OWS108CallLoggingPreference alloc] initWithPrimaryStorage:primaryStorage],
|
|
|
|
|
[[OWS109OutgoingMessageState alloc] initWithPrimaryStorage:primaryStorage],
|
|
|
|
|
[[OWS111UDAttributesMigration alloc] initWithPrimaryStorage:primaryStorage],
|
|
|
|
|
[[OWS112TypingIndicatorsMigration alloc] initWithPrimaryStorage:primaryStorage],
|
|
|
|
|
[[OWS113MultiAttachmentMediaMessages alloc] initWithPrimaryStorage:primaryStorage],
|
|
|
|
|
[[OWS100RemoveTSRecipientsMigration alloc] init],
|
|
|
|
|
[[OWS102MoveLoggingPreferenceToUserDefaults alloc] init],
|
|
|
|
|
[[OWS103EnableVideoCalling alloc] init],
|
|
|
|
|
[[OWS104CreateRecipientIdentities alloc] init],
|
|
|
|
|
[[OWS105AttachmentFilePaths alloc] init],
|
|
|
|
|
[[OWS106EnsureProfileComplete alloc] init],
|
|
|
|
|
[[OWS107LegacySounds alloc] init],
|
|
|
|
|
[[OWS108CallLoggingPreference alloc] init],
|
|
|
|
|
[[OWS109OutgoingMessageState alloc] init],
|
|
|
|
|
[[OWS111UDAttributesMigration alloc] init],
|
|
|
|
|
[[OWS112TypingIndicatorsMigration alloc] init],
|
|
|
|
|
[[OWS113MultiAttachmentMediaMessages alloc] init],
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|