mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-23 18:15:22 +00:00
Add DB migration for recipient color preference.
// FREEBIE
This commit is contained in:
parent
4ea40b30a2
commit
86cf59f9a8
@ -63,7 +63,8 @@ public class DatabaseFactory {
|
||||
private static final int INTRODUCED_UNIQUE_PART_IDS_VERSION = 17;
|
||||
private static final int INTRODUCED_RECIPIENT_PREFS_DB = 18;
|
||||
private static final int INTRODUCED_ENVELOPE_CONTENT_VERSION = 19;
|
||||
private static final int DATABASE_VERSION = 19;
|
||||
private static final int INTRODUCED_COLOR_PREFERENCE_VERSION = 20;
|
||||
private static final int DATABASE_VERSION = 20;
|
||||
|
||||
private static final String DATABASE_NAME = "messages.db";
|
||||
private static final Object lock = new Object();
|
||||
@ -742,6 +743,10 @@ public class DatabaseFactory {
|
||||
db.execSQL("ALTER TABLE push ADD COLUMN content TEXT");
|
||||
}
|
||||
|
||||
if (oldVersion < INTRODUCED_COLOR_PREFERENCE_VERSION) {
|
||||
db.execSQL("ALTER TABLE recipient_preferences ADD COLUMN color TEXT DEFAULT NULL");
|
||||
}
|
||||
|
||||
db.setTransactionSuccessful();
|
||||
db.endTransaction();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user