summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Mount <mount@google.com>2013-07-01 13:02:52 -0700
committerGeorge Mount <mount@google.com>2013-07-01 13:02:52 -0700
commit03f97f549f8b27b770dee5c5199a819fa8603c53 (patch)
treef1dc847913575dd459f59fc4857e5e8270ce368b
parentcbb45ff9079b4f1ec19f26a1a43fb72e2c179502 (diff)
downloadandroid_packages_apps_Snap-03f97f549f8b27b770dee5c5199a819fa8603c53.zip
android_packages_apps_Snap-03f97f549f8b27b770dee5c5199a819fa8603c53.tar.gz
android_packages_apps_Snap-03f97f549f8b27b770dee5c5199a819fa8603c53.tar.bz2
Ensure no account duplicates.
Bug 9502314 Add a uniqueness constraint to account name. Change-Id: I1f0607e5ce9b90054b3b98bed1557b223d7e89a7
-rw-r--r--src/com/android/photos/data/PhotoDatabase.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/photos/data/PhotoDatabase.java b/src/com/android/photos/data/PhotoDatabase.java
index 1f15c5b..0c7b227 100644
--- a/src/com/android/photos/data/PhotoDatabase.java
+++ b/src/com/android/photos/data/PhotoDatabase.java
@@ -34,7 +34,7 @@ import java.util.List;
public class PhotoDatabase extends SQLiteOpenHelper {
@SuppressWarnings("unused")
private static final String TAG = PhotoDatabase.class.getSimpleName();
- static final int DB_VERSION = 2;
+ static final int DB_VERSION = 3;
private static final String SQL_CREATE_TABLE = "CREATE TABLE ";
@@ -80,7 +80,7 @@ public class PhotoDatabase extends SQLiteOpenHelper {
private static final String[][] CREATE_ACCOUNT = {
{ Accounts._ID, "INTEGER PRIMARY KEY AUTOINCREMENT" },
- { Accounts.ACCOUNT_NAME, "TEXT NOT NULL" },
+ { Accounts.ACCOUNT_NAME, "TEXT UNIQUE NOT NULL" },
};
@Override