Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.bacheles.fmi.uni.ballhop;
- import android.content.Context;
- import android.database.sqlite.SQLiteDatabase;
- import android.database.sqlite.SQLiteOpenHelper;
- /**
- * Created by fmi on 20.1.2018 г..
- */
- public class DatebaseHelper extends SQLiteOpenHelper{
- public static final String DB_NAME = "hopBase.sqlite";
- public static final int DB_VERSION = 1;
- public static final String USER_ID = "_id";
- public static final String USER_USERNAME = "username";
- public static final String USER_PASSWORD = "password";
- public static final String USER_EMAIL = "email";
- public static final String USER_GENDER = "gender";
- public static final String USER_AVATAR = "avatar";
- public static final String CREATE_TABLE_USER = "CREATE TABLE user ('" + USER_ID + "' INTEGER PRIMARY KEY AUTOINCREMENT," +
- "'" + USER_USERNAME + "' TEXT NOT NULL UNIQUE," +
- "'" + USER_PASSWORD + "' TEXT NOT NULL," +
- "'" + USER_EMAIL + "' TEXT NOT NULL UNIQUE," +
- "'" + USER_GENDER + "' TEXT," +
- "'" + USER_AVATAR + "' TEXT DEFAULT 'noimage.png')";
- public DatebaseHelper(Context context) {
- super(context, DB_NAME, null, DB_VERSION);
- }
- @Override
- public void onCreate(SQLiteDatabase sqLiteDatabase) {
- }
- @Override
- public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement