diff --git a/src/org/thoughtcrime/securesms/database/DatabaseFactory.java b/src/org/thoughtcrime/securesms/database/DatabaseFactory.java index 72c484acd6..64dfa215b7 100644 --- a/src/org/thoughtcrime/securesms/database/DatabaseFactory.java +++ b/src/org/thoughtcrime/securesms/database/DatabaseFactory.java @@ -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(); }