Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created April 17, 2019 04:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/b7f54f9168ed5bed4b36cfc9e25710a4 to your computer and use it in GitHub Desktop.
Save parzibyte/b7f54f9168ed5bed4b36cfc9e25710a4 to your computer and use it in GitHub Desktop.
package me.parzibyte.agenda;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
public class ConexionSQLiteHelper extends SQLiteOpenHelper {
public ConexionSQLiteHelper(Context context, String name, SQLiteDatabase.CursorFactory factory, int version) {
super(context, name, factory, version);
}
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL(Utilerias.CREAR_TABLA_PERSONA);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
db.execSQL("DROP TABLE IF EXISTS " + Utilerias.TABLA_PERSONA);
onCreate(db);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment