]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/model/MobileLedgerProfile.java
ordered deletion when wiping profile data
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / model / MobileLedgerProfile.java
index 62ab8f4b867b7eb765e02721f94599a0ce0b8713..6f6e51cbd6e5293dca8b9e562780e1086aa3ea3a 100644 (file)
@@ -452,12 +452,12 @@ public final class MobileLedgerProfile {
         db.beginTransactionNonExclusive();
         try {
             Object[] uuid_param = new Object[]{uuid};
-            db.execSQL("delete from profiles where uuid=?", uuid_param);
-            db.execSQL("delete from accounts where profile=?", uuid_param);
-            db.execSQL("delete from account_values where profile=?", uuid_param);
-            db.execSQL("delete from transactions where profile=?", uuid_param);
             db.execSQL("delete from transaction_accounts where profile=?", uuid_param);
+            db.execSQL("delete from transactions where profile=?", uuid_param);
+            db.execSQL("delete from account_values where profile=?", uuid_param);
+            db.execSQL("delete from accounts where profile=?", uuid_param);
             db.execSQL("delete from options where profile=?", uuid_param);
+            db.execSQL("delete from profiles where uuid=?", uuid_param);
             db.setTransactionSuccessful();
         }
         finally {