]> git.ktnx.net Git - mobile-ledger.git/commitdiff
remove all data belonging to previously deleted accounts
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Mon, 18 Mar 2019 09:12:36 +0000 (11:12 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Mon, 25 Mar 2019 06:17:36 +0000 (06:17 +0000)
app/src/main/res/raw/sql_20.sql [new file with mode: 0644]

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