mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-08 00:02:03 -04:00
android: Fix database upgrade from older versions
This commit is contained in:
parent
4c0d74bc12
commit
199412a8ef
@ -230,7 +230,7 @@ public class VpnProfileDataSource
|
|||||||
db.beginTransaction();
|
db.beginTransaction();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Cursor cursor = db.query(TABLE_VPNPROFILE, ALL_COLUMNS, KEY_UUID + " is NULL", null, null, null, null);
|
Cursor cursor = db.query(TABLE_VPNPROFILE, getColumns(16), KEY_UUID + " is NULL", null, null, null, null);
|
||||||
for (cursor.moveToFirst(); !cursor.isAfterLast(); cursor.moveToNext())
|
for (cursor.moveToFirst(); !cursor.isAfterLast(); cursor.moveToNext())
|
||||||
{
|
{
|
||||||
ContentValues values = new ContentValues();
|
ContentValues values = new ContentValues();
|
||||||
@ -248,7 +248,7 @@ public class VpnProfileDataSource
|
|||||||
if (oldVersion < 17)
|
if (oldVersion < 17)
|
||||||
{
|
{
|
||||||
db.execSQL("ALTER TABLE " + TABLE_VPNPROFILE + " ADD " + KEY_DNS_SERVERS +
|
db.execSQL("ALTER TABLE " + TABLE_VPNPROFILE + " ADD " + KEY_DNS_SERVERS +
|
||||||
" TEXT;");
|
" TEXT;");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user