Contacts management.
This commit is contained in:
@@ -51,6 +51,8 @@ public class DatabaseService : IDatabaseService
|
||||
Connection.CreateTableAsync<MailItemFolder>(),
|
||||
Connection.CreateTableAsync<MailAccount>(),
|
||||
Connection.CreateTableAsync<AccountContact>(),
|
||||
Connection.CreateTableAsync<ContactGroup>(),
|
||||
Connection.CreateTableAsync<ContactGroupMember>(),
|
||||
Connection.CreateTableAsync<CustomServerInformation>(),
|
||||
Connection.CreateTableAsync<AccountSignature>(),
|
||||
Connection.CreateTableAsync<MergedInbox>(),
|
||||
@@ -117,6 +119,15 @@ public class DatabaseService : IDatabaseService
|
||||
.ExecuteAsync($"ALTER TABLE {nameof(CustomServerInformation)} ADD COLUMN {nameof(CustomServerInformation.CalendarSupportMode)} INTEGER NOT NULL DEFAULT 0")
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
|
||||
var contactColumns = await Connection.GetTableInfoAsync(nameof(AccountContact)).ConfigureAwait(false);
|
||||
|
||||
if (!contactColumns.Any(c => c.Name == nameof(AccountContact.ContactPictureFileId)))
|
||||
{
|
||||
await Connection
|
||||
.ExecuteAsync($"ALTER TABLE {nameof(AccountContact)} ADD COLUMN {nameof(AccountContact.ContactPictureFileId)} TEXT NULL")
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
private async Task EnsureIndexesAsync()
|
||||
|
||||
Reference in New Issue
Block a user