package cn.nec.nlc.example.ContentProviderTest05.database;

import android.database.sqlite.SQLiteDatabase;
import android.util.Log;

public class TodoTable {
	// Database table
	public static final String TABLE_TODO = "todo";	// table_name
	public static final String COLUMN_ID = "_id";
	public static final String COLUMN_CATEGORY = "category";
	public static final String COLUMN_SUMMARY = "summary";
	public static final String COLUMN_DESCRIPTION = "description";

	// Database creation SQL statement
	private static final String DATABASE_CREATE = "create table " 
	      + TABLE_TODO
	      + "(" 
	      + COLUMN_ID + " integer primary key autoincrement, " 
	      + COLUMN_CATEGORY + " text not null, " 
	      + COLUMN_SUMMARY + " text not null," 
	      + COLUMN_DESCRIPTION + " text not null" 
	      + ");";

	public static void onCreate(SQLiteDatabase database) {
	    database.execSQL(DATABASE_CREATE);
	}

	public static void onUpgrade(SQLiteDatabase database, int oldVersion,
	      int newVersion) {
	    Log.w(TodoTable.class.getName(), "Upgrading database from version "
	        + oldVersion + " to " + newVersion
	        + ", which will destroy all old data");
	    database.execSQL("DROP TABLE IF EXISTS " + TABLE_TODO);
	    onCreate(database);
	}
}

@@ -1172,16 +1172,252 @@
 data%22);%0A
+%09    // DROP TABLE statement is used to remove a table definition and all %0A%09    // associated data, indexes, triggers, constraints and permission %0A%09    // specifications for that table.%0A%09    // e.g. DROP TABLE database_name.table_name;%0A
 %09    dat

Add DROP TABLE comment in TodoTable.java