diff options
author | Christian S <christian@pix-art.de> | 2015-11-07 09:49:32 +0100 |
---|---|---|
committer | Christian S <christian@pix-art.de> | 2015-11-07 09:49:32 +0100 |
commit | fc4ead341f9015fe106f2f267a113bb13ccb2fd4 (patch) | |
tree | c349a29cd0cf9add802b7416c8db457644dc8402 /src | |
parent | a8cdf281a078285fe38f7a7f8de22f6b1f9462b9 (diff) | |
parent | c6e54e7e5a3e402553d2f57e2997fb80d029d559 (diff) |
Merge remote-tracking branch 'siacs/master' into development
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java b/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java index fdbfe4fee..0e133d192 100644 --- a/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java +++ b/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java @@ -304,6 +304,12 @@ public class DatabaseBackend extends SQLiteOpenHelper { db.execSQL("ALTER TABLE " + Message.TABLENAME + " ADD COLUMN " + Message.CARBON + " INTEGER"); } + if (oldVersion < 19 && newVersion >= 19) { + db.execSQL("ALTER TABLE " + Account.TABLENAME + " ADD COLUMN "+ Account.DISPLAY_NAME+ " TEXT"); + } + /* Any migrations that alter the Account table need to happen BEFORE this migration, as it + * depends on account de-serialization. + */ if (oldVersion < 17 && newVersion >= 17) { List<Account> accounts = getAccounts(db); for (Account account : accounts) { @@ -325,9 +331,6 @@ public class DatabaseBackend extends SQLiteOpenHelper { if (oldVersion < 18 && newVersion >= 18) { db.execSQL("ALTER TABLE " + Message.TABLENAME + " ADD COLUMN "+ Message.READ+ " NUMBER DEFAULT 1"); } - if (oldVersion < 19 && newVersion >= 19) { - db.execSQL("ALTER TABLE " + Account.TABLENAME + " ADD COLUMN "+ Account.DISPLAY_NAME+ " TEXT"); - } } public static synchronized DatabaseBackend getInstance(Context context) { |