package se.chalmers.watchme.database;

import android.database.sqlite.SQLiteDatabase;
import android.util.Log;
/**
 * The table in the database that holds data for Movies.
 * 
 * @author lisastenberg
 */
public class MoviesTable {

	public static final String TABLE_MOVIES = "movies";

	public static final String COLUMN_MOVIE_ID = "_id";
	public static final String COLUMN_TITLE = "title";
	public static final String COLUMN_RATING = "rating";
	public static final String COLUMN_NOTE = "note";
	public static final String COLUMN_DATE = "releasedate";
	public static final String COLUMN_IMDB_ID = "imdbid";

	private static final String CREATE_MOVIES_TABLE = "CREATE TABLE "
			+ TABLE_MOVIES + "(" + COLUMN_MOVIE_ID + " INTEGER PRIMARY KEY,"
			+ COLUMN_TITLE + " TEXT," + COLUMN_RATING + " INTEGER," + COLUMN_NOTE
			+ " TEXT," + COLUMN_DATE + " INTEGER," + COLUMN_IMDB_ID +" TEXT" + ")";

	public static void onCreate(SQLiteDatabase db) {
		db.execSQL(CREATE_MOVIES_TABLE);
	}

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

@@ -599,16 +599,156 @@
 imdbid%22;
+%0A%09public static final String COLUMN_POSTER_LARGE = %22poster_url_large%22;%0A%09public static final String COLUMN_POSTER_SMALL = %22poster_url_small%22;
 %0A%0A%09priva
@@ -1019,13 +1019,77 @@
 TEXT
+,
 %22 
-+ %22
+%0A%09%09%09+ COLUMN_POSTER_LARGE + %22 TEXT,%22 + COLUMN_POSTER_SMALL+ %22 TEXT
 )%22;%0A

Add image URL fields to Movie database table