我遇到了一个问题,因此我不知道如何迁移数据库的以下更改:
@Insert(onConflict = OnConflictStrategy.REPLACE) //onConflict was added
void insertContact(Contact contact);
@Entity(indices = {@Index(value = {"phonenumber"},
unique = true)}) // again Content in brackets was added
这就是我现在的全部:
static final Migration MIGRATION_2_3 = new Migration(2, 3) {
@Override
public void migrate(SupportSQLiteDatabase database) {
// Migration
}
};