|
|
@ -192,6 +192,7 @@ static NSString *keychainDBPassAccount = @"TSDatabasePass";
|
|
|
|
- (void)setupDatabaseWithSafeBlockingMigrations:(void (^_Nonnull)())safeBlockingMigrationsBlock
|
|
|
|
- (void)setupDatabaseWithSafeBlockingMigrations:(void (^_Nonnull)())safeBlockingMigrationsBlock
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Synchronously register extensions which are essential for views.
|
|
|
|
// Synchronously register extensions which are essential for views.
|
|
|
|
|
|
|
|
[TSDatabaseView registerThreadDatabaseView];
|
|
|
|
[TSDatabaseView registerThreadInteractionsDatabaseView];
|
|
|
|
[TSDatabaseView registerThreadInteractionsDatabaseView];
|
|
|
|
[TSDatabaseView registerUnreadDatabaseView];
|
|
|
|
[TSDatabaseView registerUnreadDatabaseView];
|
|
|
|
[self.database registerExtension:[TSDatabaseSecondaryIndexes registerTimeStampIndex] withName:@"idx"];
|
|
|
|
[self.database registerExtension:[TSDatabaseSecondaryIndexes registerTimeStampIndex] withName:@"idx"];
|
|
|
@ -209,7 +210,6 @@ static NSString *keychainDBPassAccount = @"TSDatabasePass";
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// All sync registrations must be done before all async registrations,
|
|
|
|
// All sync registrations must be done before all async registrations,
|
|
|
|
// or the sync registrations will block on the async registrations.
|
|
|
|
// or the sync registrations will block on the async registrations.
|
|
|
|
[TSDatabaseView asyncRegisterThreadDatabaseView];
|
|
|
|
|
|
|
|
[TSDatabaseView asyncRegisterUnseenDatabaseView];
|
|
|
|
[TSDatabaseView asyncRegisterUnseenDatabaseView];
|
|
|
|
[TSDatabaseView asyncRegisterThreadOutgoingMessagesDatabaseView];
|
|
|
|
[TSDatabaseView asyncRegisterThreadOutgoingMessagesDatabaseView];
|
|
|
|
[TSDatabaseView asyncRegisterThreadSpecialMessagesDatabaseView];
|
|
|
|
[TSDatabaseView asyncRegisterThreadSpecialMessagesDatabaseView];
|
|
|
|