Skip to content

Instantly share code, notes, and snippets.

@johannfjs
Created November 26, 2014 17:08
Show Gist options
  • Save johannfjs/0a17c5e8924df43674a5 to your computer and use it in GitHub Desktop.
Save johannfjs/0a17c5e8924df43674a5 to your computer and use it in GitHub Desktop.
ManageOpenHelper
public class ManageOpenHelper extends SQLiteOpenHelper {
public ManageOpenHelper(Context context) {
super(context, Constant.DBname, null, Constant.DBversion);
// TODO Auto-generated constructor stub
}
@Override
public void onCreate(SQLiteDatabase db) {
// TODO Auto-generated method stub
db.execSQL(Constant.CREATE_TABLE_PERSONA);
db.execSQL(Constant.CREATE_TABLE_USUARIO);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
// TODO Auto-generated method stub
db.execSQL(Constant.DROP_TABLE_USUARIO);
db.execSQL(Constant.DROP_TABLE_PERSONA);
onCreate(db);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment