Created
February 13, 2017 10:48
-
-
Save janishar/903ed8eaedcfa2f5ca1c9fa6207fd93d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DbOpenHelper extends DaoMaster.OpenHelper { | |
public DbOpenHelper(Context context, String name) { | |
super(context, name); | |
} | |
@Override | |
public void onUpgrade(Database db, int oldVersion, int newVersion) { | |
super.onUpgrade(db, oldVersion, newVersion); | |
Log.d("DEBUG", "DB_OLD_VERSION : " + oldVersion + ", DB_NEW_VERSION : " + newVersion); | |
switch (oldVersion) { | |
case 1: | |
case 2: | |
//db.execSQL("ALTER TABLE " + UserDao.TABLENAME + " ADD COLUMN " + UserDao.Properties.Name.columnName + " TEXT DEFAULT 'DEFAULT_VAL'"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment