i have five tables in my sqlite db, the five tables are created in oncreate method if i make changes to one table in upgrade method based on the previous db version when i launched the app d changes are made i can see through my logcat but it calls oncreate method and say the 4 tables already exist , how can i handle this error.
public void onUpgrade(SQLiteDatabase database, int version_old, int current_version) {
if (version_old < 3) {
database.execSQL(queryFive);
}
on onCreate i have statements that creates table initially which is then called again after onUpgrade and triggering the error they already exist.how can i handle this
Aucun commentaire:
Enregistrer un commentaire