package com.example.android.waitlist.data;

// TODO (1) extend the SQLiteOpenHelper class
public class WaitlistDbHelper {

    // TODO (2) Create a static final String called DATABASE_NAME and set it to "waitlist.db"

    // TODO (3) Create a static final int called DATABASE_VERSION and set it to 1

    // TODO (4) Create a Constructor that takes a context and calls the parent constructor

    // TODO (5) Override the onCreate method

        // TODO (6) Inside, create an String query called SQL_CREATE_WAITLIST_TABLE that will create the table

        // TODO (7) Execute the query by calling execSQL on sqLiteDatabase and pass the string query SQL_CREATE_WAITLIST_TABLE

    // TODO (8) Override the onUpgrade method

        // TODO (9) Inside, execute a drop table query, and then call onCreate to re-create it

}
@@ -37,23 +37,157 @@
 .data;%0A%0A
-// TODO
+import android.content.Context;%0Aimport android.database.sqlite.SQLiteDatabase;%0Aimport android.database.sqlite.SQLiteOpenHelper;%0A%0A// completed
  (1) ext
@@ -247,16 +247,40 @@
 bHelper 
+extends SQLiteOpenHelper
 %7B%0A%0A    /
@@ -281,20 +281,25 @@
 %0A    // 
-TODO
+completed
  (2) Cre
@@ -373,28 +373,95 @@
 ist.db%22%0A
-%0A    // TODO
+    public static final String DATABASE_NAME = %22waitlist.db%22;%0A%0A    // completed
  (3) Cre
@@ -523,28 +523,83 @@
 it to 1%0A
-%0A    // TODO
+    public static final int DATABASE_VERSION = 1;%0A%0A    // completed
  (4) Cre
@@ -674,53 +674,283 @@
 tor%0A
-%0A    // TODO (5) Override the onCreate method
+    public WaitlistDbHelper(Context context, String name, SQLiteDatabase.CursorFactory factory, int version) %7B%0A        super(context, name, factory, version);%0A    %7D%0A%0A    // completed (5) Override the onCreate method%0A    @Override%0A    public void onCreate(SQLiteDatabase db) %7B
 %0A%0A  
@@ -1191,23 +1191,35 @@
 LE%0A%0A    
-// TODO
+%7D%0A%0A    // completed
  (8) Ove
@@ -1244,16 +1244,109 @@
 e method
+%0A    @Override%0A    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) %7B
 %0A%0A      
@@ -1435,9 +1435,17 @@
 ate it%0A%0A
+%0A    %7D%0A%0A
 %7D

complete TODO 1-5 and 8