title: App can't find sqlite table for specific user
body: <p>I'm having an odd issue of a user of my companies internal app not running an sqlite query. It crashes with the following error:</p>
  
  <pre><code>android.database.sqlite.SQLiteException: no such column: intCol3 (code 1 SQLITE_ERROR): , while compiling: SELECT primaryKey, intCol1, textCol1, intCol2, textCol2, textCol3, intCol3 FROM table WHERE intCol4='1' LIMIT 100
  </code></pre>
  
  <p><code>intCol3</code> and <code>intCol4</code> are new columns added to this table for the new version I'm trying to install. However, if I remove <code>intCol3</code> it has an error with <code>intCol4</code> and if I remove that as well, it has an issue with the primaryKey..</p>
  
  <p>Initially I thought this was related to him being the only user who has android 9 on his phone but when trying it on a different android 9 device it works fine. It seems to be the second he links his google account to the device it breaks this query.</p>
  
  <p>I've tried freshly installing the app and clearing all app data and anything cached to his phone and it still throws this exception.</p>
  
  <p>I've also tried adding to the code to try creating the "Missing" columns each time he tries to log in but it doesn't make a difference. </p>
  
  <p>Has anyone came across anything similar or be able to point me in the correct direction as to where to look?
  This is my <code>onCreate</code> and <code>onUpgrade</code></p>
  
  <pre><code>@Override
  public void onCreate(SQLiteDatabase db) {
      try {
          createTables();
      } catch (Exception e) {
          Log.d("Error:","Failied to build tables:" + e);
      }
  }
  
  @Override
  public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
      Log.v("*! dbHelper upgrade", "Update contacts");
  
      db.execSQL("DROP TABLE IF EXISTS contacts");
      onCreate(db);
  }
  public void createTables() {
      SQLiteDatabase db = this.getWritableDatabase();
      Log.v("*! dbHelper create", "Create contacts");
      db.execSQL(
              "create table contacts " +
                      "(cnId integer primary key, cnName text, cnDate date)"
      );
  
  
  
      db.execSQL(
              "create table parts " +
                      "(primaryKey integer primary key, intCol1 integer, textCol1 text, intCol2 integer, textCol2 text, textCol3 text, intCol3 integer, intCol4 integer)"
      );
  
  
  
  }
  </code></pre>