mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Add missing DbOpenHelper class (required by prev. commit)
This commit is contained in:
parent
de49db5999
commit
64e16ad1cc
1 changed files with 26 additions and 0 deletions
|
|
@ -0,0 +1,26 @@
|
|||
package org.wikimedia.commons.data;
|
||||
|
||||
import android.content.Context;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
import org.wikimedia.commons.contributions.Contribution;
|
||||
|
||||
public class DBOpenHelper extends SQLiteOpenHelper{
|
||||
|
||||
private static final String DATABASE_NAME = "commons.db";
|
||||
private static final int DATABASE_VERSION = 1;
|
||||
|
||||
public DBOpenHelper(Context context) {
|
||||
super(context, DATABASE_NAME, null, DATABASE_VERSION);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(SQLiteDatabase sqLiteDatabase) {
|
||||
Contribution.Table.onCreate(sqLiteDatabase);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i2) {
|
||||
Contribution.Table.onUpdate(sqLiteDatabase);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue