title: SQLite Database Upgrading
body: <p>I am a bit confused with the android SQLite database handling. I went through tutorials but I didn't get the exact point.</p>
  
  <p>We can have a database class that extends <code>SQLiteOpenHelper</code>, and can override <code>onCreate()</code> method and create a database.</p>
  
  <p>Upgrading database part is a bit confusing. In the following method, how to handle the verions
  <code>onUpdate(SQLiteDatabase db,int old Version,int newVerison)</code></p>
  
  <p>Does it mean that when the first time we create database the version is 1. Then, once modified the version become 2.
  Then if we want to modify again 
  old Version = 2,    newVerison = 3<br>
  [<code>onUpdate(SQLiteDatabase db,int old Version,int newVerison)</code> ]</p>
  
  <p>This method will be execute when we pass the constructor version as in the following code (as 2)</p>
  
  <pre><code>public DatabaseHelper(Context context) {
    super(context, dbName, null,2);
  }
  </code></pre>
  
  <p>I need to know whether when we need to call <code>onUpgrade()</code> method should we pass version as 2 always or we have to increase one every time for the previous version.</p>