diff --git a/astrid/src/com/todoroo/astrid/dao/Database.java b/astrid/src/com/todoroo/astrid/dao/Database.java index 38081a237..71915080f 100644 --- a/astrid/src/com/todoroo/astrid/dao/Database.java +++ b/astrid/src/com/todoroo/astrid/dao/Database.java @@ -38,7 +38,7 @@ public class Database extends AbstractDatabase { * Database version number. This variable must be updated when database * tables are updated, as it determines whether a database needs updating. */ - public static final int VERSION = 22; + public static final int VERSION = 23; /** * Database name (must be unique) @@ -295,9 +295,6 @@ public class Database extends AbstractDatabase { Log.e("astrid", "db-upgrade-" + oldVersion + "-" + newVersion, e); } case 21: try { - database.execSQL(createTableSql(visitor, User.TABLE.name, User.PROPERTIES)); - onCreateTables(); - for(Property property : new Property[] { Update.OTHER_USER_ID, Update.OTHER_USER }) database.execSQL("ALTER TABLE " + Update.TABLE.name + " ADD " + property.accept(visitor, null)); @@ -306,6 +303,12 @@ public class Database extends AbstractDatabase { catch (SQLiteException e) { Log.e("astrid", "db-upgrade-" + oldVersion + "-" + newVersion, e); } + case 22: try { + database.execSQL(createTableSql(visitor, User.TABLE.name, User.PROPERTIES)); + onCreateTables(); + } catch (SQLiteException e) { + Log.e("astrid", "db-upgrade-" + oldVersion + "-" + newVersion, e); + } return true; }