Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3422fd73 authored by Paul Sliwowski's avatar Paul Sliwowski
Browse files

Fix issue with db upgrade from 5 to 7.

Bug: 10781994
Change-Id: I1c91951977428dfc534eaddf4440ed428a635bc8
(cherry picked from commit 285aa982)
parent ddfdd962
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -145,8 +145,8 @@ class ClockDatabaseHelper extends SQLiteOpenHelper {

        if (oldVersion <= VERSION_6) {
            // These were not used in DB_VERSION_6, so we can just drop them.
            db.execSQL("DROP TABLE " + INSTANCES_TABLE_NAME + ";");
            db.execSQL("DROP TABLE " + CITIES_TABLE_NAME + ";");
            db.execSQL("DROP TABLE IF EXISTS " + INSTANCES_TABLE_NAME + ";");
            db.execSQL("DROP TABLE IF EXISTS " + CITIES_TABLE_NAME + ";");

            // Create new alarms table and copy over the data
            createAlarmsTable(db);
@@ -195,7 +195,7 @@ class ClockDatabaseHelper extends SQLiteOpenHelper {
            cursor.close();

            Log.i("Dropping old alarm table");
            db.execSQL("DROP TABLE " + OLD_ALARMS_TABLE_NAME + ";");
            db.execSQL("DROP TABLE IF EXISTS " + OLD_ALARMS_TABLE_NAME + ";");
        }
    }