]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/res/raw/sql_20.sql
remove all data belonging to previously deleted accounts
[mobile-ledger.git] / app / src / main / res / raw / sql_20.sql
diff --git a/app/src/main/res/raw/sql_20.sql b/app/src/main/res/raw/sql_20.sql
new file mode 100644 (file)
index 0000000..0485520
--- /dev/null
@@ -0,0 +1,4 @@
+delete from accounts where not exists (select 1 from profiles where uuid = profile);
+delete from account_values where not exists (select 1 from profiles where uuid = profile);
+delete from transactions where not exists (select 1 from profiles where uuid = profile);
+delete from transaction_accounts where not exists (select 1 from profiles where uuid = profile);
\ No newline at end of file