2017-05-23 17:28:12 +02:00
|
|
|
//
|
|
|
|
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
|
|
|
//
|
2016-09-28 18:21:14 +02:00
|
|
|
|
2017-12-01 21:17:29 +01:00
|
|
|
#import <SignalServiceKit/TSYapDatabaseObject.h>
|
2016-09-28 18:21:14 +02:00
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
@class TSStorageManager;
|
|
|
|
|
|
|
|
@interface OWSDatabaseMigration : TSYapDatabaseObject
|
|
|
|
|
|
|
|
- (instancetype)initWithStorageManager:(TSStorageManager *)storageManager;
|
|
|
|
|
|
|
|
@property (nonatomic, readonly) TSStorageManager *storageManager;
|
|
|
|
|
2017-05-23 17:28:12 +02:00
|
|
|
// Prefer nonblocking (async) migrations by overriding `runUpWithTransaction:` in a subclass.
|
|
|
|
// Blocking migrations running too long will crash the app, effectively bricking install
|
|
|
|
// because the user will never get past it.
|
|
|
|
// If you must write a launch-blocking migration, override runUp.
|
2016-09-28 18:21:14 +02:00
|
|
|
- (void)runUp;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|