SQLiteDatabase db = App.getDatabase();
try (Cursor cursor = db.rawQuery("SELECT uuid, name, url, use_authentication, auth_user, " +
"auth_password, permit_posting, theme, order_no, " +
- "preferred_accounts_filter, future_dates FROM " +
- "profiles order by order_no", null))
+ "preferred_accounts_filter, future_dates, api_version " +
+ "FROM " + "profiles order by order_no", null))
{
while (cursor.moveToNext()) {
MobileLedgerProfile item = new MobileLedgerProfile(cursor.getString(0));
item.orderNo = cursor.getInt(8);
item.setPreferredAccountsFilter(cursor.getString(9));
item.setFutureDates(cursor.getInt(10));
+ item.setApiVersion(cursor.getInt(11));
list.add(item);
if (item.getUuid()
.equals(currentProfileUUID))
// permitPosting ? "TRUE" : "FALSE", authEnabled ? "TRUE" : "FALSE", themeId));
db.execSQL("REPLACE INTO profiles(uuid, name, permit_posting, url, " +
"use_authentication, auth_user, " +
- "auth_password, theme, order_no, preferred_accounts_filter, future_dates) " +
- "VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
+ "auth_password, theme, order_no, preferred_accounts_filter, future_dates, " +
+ "api_version) " + "VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
new Object[]{uuid, name, permitPosting, url, authEnabled,
authEnabled ? authUserName : null,
authEnabled ? authPassword : null, themeId, orderNo,
- preferredAccountsFilter, futureDates.toInt()
+ preferredAccountsFilter, futureDates.toInt(), apiVersion.toInt()
});
db.setTransactionSuccessful();
}