Skip to content

Commit 2de31e7

Browse files
committed
Merge pull request #26 from bryant1410/patch-4
Create the table if not exists
2 parents 5862b0d + 674dee8 commit 2de31e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SimpleNoSQL/src/main/java/com/colintmiller/simplenosql/db/SimpleNoSQLDBHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class SimpleNoSQLDBHelper extends SQLiteOpenHelper {
3232
private static final String TEXT_TYPE = " TEXT";
3333
private static final String COMMA_SEP = ",";
3434
private static final String SQL_CREATE_ENTRIES =
35-
"CREATE TABLE " + EntityEntry.TABLE_NAME + " (" +
35+
"CREATE TABLE IF NOT EXISTS " + EntityEntry.TABLE_NAME + " (" +
3636
EntityEntry._ID + " INTEGER PRIMARY KEY," +
3737
EntityEntry.COLUMN_NAME_BUCKET_ID + TEXT_TYPE + COMMA_SEP +
3838
EntityEntry.COLUMN_NAME_ENTITY_ID + TEXT_TYPE + COMMA_SEP +

0 commit comments

Comments
 (0)