From e8beb103cbeade5819bedb335f3d1212b0fc5b37 Mon Sep 17 00:00:00 2001 From: Eric House Date: Fri, 26 May 2023 13:22:44 -0700 Subject: [PATCH] add col to dictinfo telling whether dict is available on server --- .../java/org/eehouse/android/xw4/DBHelper.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DBHelper.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DBHelper.java index 2793ac0c7..7cf6dfe91 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DBHelper.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DBHelper.java @@ -41,7 +41,7 @@ public class DBHelper extends SQLiteOpenHelper { private static final String TAG = DBHelper.class.getSimpleName(); private static final String DB_NAME = BuildConfig.DB_NAME; - private static final int DB_VERSION = 32; + private static final int DB_VERSION = 33; public static final String GAME_NAME = "GAME_NAME"; public static final String VISID = "VISID"; @@ -62,6 +62,7 @@ public class DBHelper extends SQLiteOpenHelper { public static final String EXTRAS = "EXTRAS"; private static final String DICTLANG = "DICTLANG"; public static final String ISOCODE = "ISOCODE"; + public static final String ON_SERVER = "ON_SERVER"; public static final String LANGNAME = "LANGNAME"; public static final String DICTLIST = "DICTLIST"; public static final String HASMSGS = "HASMSGS"; @@ -179,8 +180,9 @@ public class DBHelper extends SQLiteOpenHelper { { FULLSUM, "TEXT(32)" }, { WORDCOUNT, "INTEGER" }, { LANGCODE, "INTEGER" }, // deprecated - { LANGNAME, "TEXT" }, + { LANGNAME, "TEXT" }, { ISOCODE, "TEXT(8)" }, + { ON_SERVER, "INTEGER DEFAULT 0" }, }, 12 ), GROUPS( "groups", new String[][] { { GROUPNAME, "TEXT" }, @@ -372,6 +374,14 @@ public class DBHelper extends SQLiteOpenHelper { } catch ( SQLiteException ex ) { Log.ex( TAG, ex ); } + + case 32: + if ( !madeDITable ) { + addColumn( db, TABLE_NAMES.DICTINFO, ON_SERVER ); + } + + + break; default: for ( TABLE_NAMES table : TABLE_NAMES.values() ) {