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

Commit 768cb139 authored by Jon Miranda's avatar Jon Miranda Committed by Sunny Goyal
Browse files

Fix bug where we incorrectly change the default profile id of the database.

Change-Id: I0fafc06f5e28c1fdff77003c984e686719a60cd2
parent ce78e168
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -173,12 +173,6 @@ public class RestoreDbTask {
        values.put(Favorites.PROFILE_ID, newProfileId);
        db.update(Favorites.TABLE_NAME, values, "profileId = ?",
                new String[]{Long.toString(oldProfileId)});

        // Change default value of the column.
        db.execSQL("ALTER TABLE favorites RENAME TO favorites_old;");
        Favorites.addTableToDb(db, newProfileId, false);
        db.execSQL("INSERT INTO favorites SELECT * FROM favorites_old;");
        dropTable(db, "favorites_old");
    }