android: onUpgrade on sqlite wont work for me
<p>i add new column on my database (i have data on this database)</p>

<p>i have this code:</p>

<pre><code>@Override 
     public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
         if (newVersion &gt; oldVersion) {
             db.execSQL("ALTER TABLE MEN ADD COLUMN New_Pulse INTEGER DEFAULT 0");
         }
     }
</code></pre>

<p>but it wont work, from where i get the oldVersion and the newVersion ?</p>

<p>For now i done this:</p>

<pre><code> try{
          db.execSQL("ALTER TABLE MEN ADD COLUMN New_Pulse INTEGER DEFAULT 0");
        }
        catch (Exception e) {
            // TODO: handle exception
        }
</code></pre>

<p>it work for me - but i know that its Ugly solution</p>
