title: Android SQLite onUpgrade not called
body: <p>I have my database created in event <code>onCreate</code>, in which I have a lot of tables, but I need add 1 more table, and I can't lose any data, So I need to use the event <code>onUpgrade</code>, So I hope you guys help me because I don't know how to use it.</p>
  
  <p>Example : </p>
  
  <pre><code>public void onCreate(SQLiteDatabase db) {
      sql = "CREATE TABLE IF NOT EXISTS funcionarios"
              +"(codigo INTEGER PRIMARY KEY, funcionario TEXT, apelido TEXT , functionTEXT, cartao TEXT , foto TEXT , tipo_foto TEXT);";  
      db.execSQL(sql);
  }
  </code></pre>
  
  <p>what i need is </p>
  
  <pre><code>public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
      if(oldVersion &lt; 2){
          db.execSQL("CREATE TABLE IF NOT EXISTS calibrar_aceleracao"+
                   "(limiteMaximo INTEGER, limiteMinimo INTEGER);");
      }
  }
  </code></pre>
  
  <p>but it doesn't work.</p>
  
  <p>thanks.</p>