Actualización de GreenDAO
Frecuentes
Visto 530 veces
2 Respuestas
2
Which SQLiteOpenHelper are you using?
Check your generated DaoMaster class. It has an inner class DevOpenHelper which drops all tables on update.
Respondido el 20 de Septiembre de 12 a las 17:09
2
Please check DaoMaster.java
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
Log.i("greenDAO", "Upgrading schema from version " + oldVersion + " to " + newVersion + " by dropping all tables");
dropAllTables(db, true);
onCreate(db);
}
Make Sure dropAllTables(db, true); have true and again problem exist debug here
Respondido el 21 de enero de 15 a las 12:01
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas android greendao or haz tu propia pregunta.
You mean you change the schema? If you want to change the DB schema. You should change the schema version in Generator and re-generate the code again. Or you want to do some db migration when you upgrade your DB so you want to customize the onUpgrade part? - Nevin Chen