mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 16:57:50 +00:00
Hard-code migration for full-text search.
This commit is contained in:
parent
8be0fd0867
commit
67407ec667
@ -198,14 +198,12 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
|
|||||||
Log.i(TAG, "Beginning to build search index.");
|
Log.i(TAG, "Beginning to build search index.");
|
||||||
long start = SystemClock.elapsedRealtime();
|
long start = SystemClock.elapsedRealtime();
|
||||||
|
|
||||||
db.execSQL("INSERT INTO " + SearchDatabase.SMS_FTS_TABLE_NAME + " (rowid, " + SearchDatabase.BODY + ") " +
|
db.execSQL("INSERT INTO sms_fts (rowid, body) SELECT _id, body FROM sms");
|
||||||
"SELECT " + SmsDatabase.ID + " , " + SmsDatabase.BODY + " FROM " + SmsDatabase.TABLE_NAME);
|
|
||||||
|
|
||||||
long smsFinished = SystemClock.elapsedRealtime();
|
long smsFinished = SystemClock.elapsedRealtime();
|
||||||
Log.i(TAG, "Indexing SMS completed in " + (smsFinished - start) + " ms");
|
Log.i(TAG, "Indexing SMS completed in " + (smsFinished - start) + " ms");
|
||||||
|
|
||||||
db.execSQL("INSERT INTO " + SearchDatabase.MMS_FTS_TABLE_NAME + " (rowid, " + SearchDatabase.BODY + ") " +
|
db.execSQL("INSERT INTO mms_fts (rowid, body) SELECT _id, body FROM mms");
|
||||||
"SELECT " + MmsDatabase.ID + " , " + MmsDatabase.BODY + " FROM " + MmsDatabase.TABLE_NAME);
|
|
||||||
|
|
||||||
long mmsFinished = SystemClock.elapsedRealtime();
|
long mmsFinished = SystemClock.elapsedRealtime();
|
||||||
Log.i(TAG, "Indexing MMS completed in " + (mmsFinished - smsFinished) + " ms");
|
Log.i(TAG, "Indexing MMS completed in " + (mmsFinished - smsFinished) + " ms");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user