package academic.th;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * Created by Sistemas on 24/08/2016.
 */
public class AdminSQLite extends SQLiteOpenHelper {

    public AdminSQLite(Context context, String name, SQLiteDatabase.CursorFactory factory, int version) {
        super(context, name, factory, version);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {

        db.execSQL("create table alumno (serial_alu integer primary key AUTOINCREMENT, calumno_alu text, cpadre_alu text)");

    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

        db.execSQL("drop table if exists alumno");
        db.execSQL("create table alumno (serial_alu integer primary key AUTOINCREMENT, calumno_alu text, cpadre_alu text)");
    }
}
