@@ -0,0 +1,1698 @@
+package com.example.android.sunshine.data;%0A%0A%0Aimport android.content.Context;%0Aimport android.database.sqlite.SQLiteDatabase;%0Aimport android.database.sqlite.SQLiteOpenHelper;%0Aimport com.example.android.sunshine.data.WeatherContract.WeatherEntry;%0A%0A%0Apublic class WeatherDbHelper extends SQLiteOpenHelper %7B%0A    public static final String DATABASE_NAME = %22weather.db%22;%0A    private static final int DATABASE_VERSION = 3;%0A%0A    public WeatherDbHelper(Context context) %7B%0A        super(context, DATABASE_NAME, null, DATABASE_VERSION);%0A    %7D%0A%0A    @Override%0A    public void onCreate(SQLiteDatabase db) %7B%0A        final String SQL_CREATE_WEATHER_TABLE = %22CREATE TABLE %22 + WeatherEntry.TABLE_NAME + %22 (%22 +%0A                WeatherEntry._ID + %22 INTEGER PRIMARY KEY AUTOINCREMENT, %22 +%0A                WeatherEntry.COLUMN_DATE + %22 INTEGER NOT NULL, %22 +%0A                WeatherEntry.COLUMN_WEATHER_ID + %22 INTEGER NOT NULL, %22 +%0A                WeatherEntry.COLUMN_MIN_TEMP + %22 REAL NOT NULL, %22 +%0A                WeatherEntry.COLUMN_MAX_TEMP + %22 REAL NOT NULL, %22 +%0A                WeatherEntry.COLUMN_HUMIDITY + %22 REAL NOT NULL, %22 +%0A                WeatherEntry.COLUMN_PRESSURE + %22 REAL NOT NULL, %22 +%0A                WeatherEntry.COLUMN_WIND_SPEED + %22 REAL NOT NULL, %22 +%0A                WeatherEntry.COLUMN_DEGREES + %22 REAL NOT NULL, %22 +%0A                // replace an old record with a new record if the date is the same but the remaining%0A                // columns are different.%0A                %22 UNIQUE (%22 + WeatherEntry.COLUMN_DATE + %22) ON CONFLICT REPLACE);%22;%0A%0A        db.execSQL(SQL_CREATE_WEATHER_TABLE);%0A    %7D%0A%0A    @Override%0A    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) %7B%0A%0A    %7D%0A%7D%0A

add weather database