I made a DbFlow migration for my SQLite Db. I added two columns and the build was successful The problem is I cant see those columns anywhere in the User table and i cant insert or read data from them. What could be the problem ?
My migration code.
package com.omnitech.elunda.mobile.database;
import com.raizlabs.android.dbflow.annotation.Database;
import com.raizlabs.android.dbflow.annotation.Migration;
import com.raizlabs.android.dbflow.sql.SQLiteType;
import com.raizlabs.android.dbflow.sql.migration.AlterTableMigration;
/**
* Created by magicwand on 9/28/2017.
* Database class to manage datastore
*/
@Database(name=ELundaDatabase.name , version=ELundaDatabase.VERSION)
public class ELundaDatabase {
public static final String name ="ElundaDatabase";
public static final int VERSION =1;
@Migration(version = ELundaDatabase.VERSION +1, database=ELundaDatabase.class)
public static class Migration1 extends AlterTableMigration<User> {
public Migration1(Class<User> table) {
super(table);
}
@Override
public void onPreMigrate() {
super.onPreMigrate();
addColumn(SQLiteType.TEXT, "phoneNumber");
addColumn(SQLiteType.TEXT, "password");
}
}
}