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>
