mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-26 03:40:56 +01:00
Make Sms/MmsDatabase ID's autoincrement.
This commit is contained in:
@@ -40,8 +40,6 @@ public class ApplicationMigrations {
|
||||
|
||||
private static final int LEGACY_CANONICAL_VERSION = 455;
|
||||
|
||||
public static final int CURRENT_VERSION = 36;
|
||||
|
||||
private static final class Version {
|
||||
static final int LEGACY = 1;
|
||||
static final int RECIPIENT_ID = 2;
|
||||
@@ -78,8 +76,11 @@ public class ApplicationMigrations {
|
||||
static final int APPLY_UNIVERSAL_EXPIRE = 34;
|
||||
static final int SENDER_KEY = 35;
|
||||
static final int SENDER_KEY_2 = 36;
|
||||
static final int DB_AUTOINCREMENT = 37;
|
||||
}
|
||||
|
||||
public static final int CURRENT_VERSION = 37;
|
||||
|
||||
/**
|
||||
* This *must* be called after the {@link JobManager} has been instantiated, but *before* the call
|
||||
* to {@link JobManager#beginJobLoop()}. Otherwise, other non-migration jobs may have started
|
||||
@@ -332,6 +333,10 @@ public class ApplicationMigrations {
|
||||
jobs.put(Version.SENDER_KEY_2, new AttributesMigrationJob());
|
||||
}
|
||||
|
||||
if (lastSeenVersion < Version.DB_AUTOINCREMENT) {
|
||||
jobs.put(Version.DB_AUTOINCREMENT, new DatabaseMigrationJob());
|
||||
}
|
||||
|
||||
return jobs;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user