Add UtcDateTypeAdapter for Gson (#2549)
* Add UtcDateTypeAdapter for Gson * add 38.json
This commit is contained in:
parent
434d345d01
commit
2983c3f48e
5 changed files with 1171 additions and 3 deletions
|
|
@ -31,7 +31,7 @@ import java.io.File;
|
|||
*/
|
||||
@Database(entities = { DraftEntity.class, AccountEntity.class, InstanceEntity.class, TimelineStatusEntity.class,
|
||||
TimelineAccountEntity.class, ConversationEntity.class
|
||||
}, version = 37)
|
||||
}, version = 38)
|
||||
public abstract class AppDatabase extends RoomDatabase {
|
||||
|
||||
public abstract AccountDao accountDao();
|
||||
|
|
@ -561,4 +561,14 @@ public abstract class AppDatabase extends RoomDatabase {
|
|||
database.execSQL("ALTER TABLE `ConversationEntity` ADD COLUMN `s_repliesCount` INTEGER NOT NULL DEFAULT 0");
|
||||
}
|
||||
};
|
||||
|
||||
public static final Migration MIGRATION_37_38 = new Migration(37, 38) {
|
||||
@Override
|
||||
public void migrate(@NonNull SupportSQLiteDatabase database) {
|
||||
|
||||
// no actual scheme change, but timestamps are now serialized differently so all cache tables that contain them need to be cleaned
|
||||
database.execSQL("DELETE FROM `TimelineStatusEntity`");
|
||||
database.execSQL("DELETE FROM `ConversationEntity`");
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue