mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-22 16:07:30 +00:00
Fix for DB creation and migration with new date schema changes.
This commit is contained in:
parent
2204584d8f
commit
118560cf0d
@ -79,7 +79,7 @@ public class MmsDatabase extends Database {
|
|||||||
private static final String DELIVERY_REPORT = "d_rpt";
|
private static final String DELIVERY_REPORT = "d_rpt";
|
||||||
|
|
||||||
public static final String CREATE_TABLE = "CREATE TABLE " + TABLE_NAME + " (" + ID + " INTEGER PRIMARY KEY, " +
|
public static final String CREATE_TABLE = "CREATE TABLE " + TABLE_NAME + " (" + ID + " INTEGER PRIMARY KEY, " +
|
||||||
THREAD_ID + " INTEGER, " + DATE_SENT + " INTEGER, " + DATE_RECEIVED + "INTEGER, " + MESSAGE_BOX + " INTEGER, " +
|
THREAD_ID + " INTEGER, " + DATE_SENT + " INTEGER, " + DATE_RECEIVED + " INTEGER, " + MESSAGE_BOX + " INTEGER, " +
|
||||||
READ + " INTEGER DEFAULT 0, " + MESSAGE_ID + " TEXT, " + SUBJECT + " TEXT, " +
|
READ + " INTEGER DEFAULT 0, " + MESSAGE_ID + " TEXT, " + SUBJECT + " TEXT, " +
|
||||||
SUBJECT_CHARSET + " INTEGER, " + CONTENT_TYPE + " TEXT, " + CONTENT_LOCATION + " TEXT, " +
|
SUBJECT_CHARSET + " INTEGER, " + CONTENT_TYPE + " TEXT, " + CONTENT_LOCATION + " TEXT, " +
|
||||||
EXPIRY + " INTEGER, " + MESSAGE_CLASS + " TEXT, " + MESSAGE_TYPE + " INTEGER, " +
|
EXPIRY + " INTEGER, " + MESSAGE_CLASS + " TEXT, " + MESSAGE_TYPE + " INTEGER, " +
|
||||||
|
@ -77,7 +77,7 @@ public class SmsMigrator {
|
|||||||
{
|
{
|
||||||
addStringToStatement(statement, cursor, 1, SmsDatabase.ADDRESS);
|
addStringToStatement(statement, cursor, 1, SmsDatabase.ADDRESS);
|
||||||
addIntToStatement(statement, cursor, 2, SmsDatabase.PERSON);
|
addIntToStatement(statement, cursor, 2, SmsDatabase.PERSON);
|
||||||
addIntToStatement(statement, cursor, 3, SmsDatabase.DATE_SENT);
|
addIntToStatement(statement, cursor, 3, SmsDatabase.DATE_RECEIVED);
|
||||||
addIntToStatement(statement, cursor, 4, SmsDatabase.DATE_RECEIVED);
|
addIntToStatement(statement, cursor, 4, SmsDatabase.DATE_RECEIVED);
|
||||||
addIntToStatement(statement, cursor, 5, SmsDatabase.PROTOCOL);
|
addIntToStatement(statement, cursor, 5, SmsDatabase.PROTOCOL);
|
||||||
addIntToStatement(statement, cursor, 6, SmsDatabase.READ);
|
addIntToStatement(statement, cursor, 6, SmsDatabase.READ);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user