/*public class TanngoBaseHelper extends SQLiteOpenHelper {
private static final int VERSION = 1;
private static final String DATABASE_NAME = "tanngoBase.db";
public TanngoBaseHelper(Context context) {
super(context, DATABASE_NAME, null, VERSION);
}
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL("create table" + TanngoTable.NAME + "(" +
" _id integer primary key autoincrement," +
TanngoTable.Columns.UUID + "," +
TanngoTable.Columns.WORD + "," +
TanngoTable.Columns.MEAN + "," +
TanngoTable.Columns.DATE + "," +
TanngoTable.Columns.SOLVED +
")"
);
}
@Override
public void nUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
}
}*/
public class TanngoBaseHelper extends SQLiteOpenHelper {
private static final int VERSION = 2;
private static final String DATABASE_NAME = "tanngoBase.db";
public TanngoBaseHelper(Context context) {
super(context, DATABASE_NAME, null, VERSION);
}
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL("create table " + TanngoTable.NAME + "(" +
" _id integer primary key autoincrement, " +
TanngoTable.Columns.UUID + ", " +
TanngoTable.Columns.WORD + ", " +
TanngoTable.Columns.MEAN + ", " +
TanngoTable.Columns.DATE + ", " +
TanngoTable.Columns.SOLVED +
")"
);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
}
}
PHP中文网2017-04-17 17:53:51
VERSION はデータベースのバージョンを表し、データベースが更新されると変更されます。 ソフトウェアのバージョンが異なる場合があり、データベースのバージョンも異なり、データベース内のフィールドも異なります