From: Damyan Ivanov Date: Mon, 18 Mar 2019 09:12:36 +0000 (+0200) Subject: remove all data belonging to previously deleted accounts X-Git-Tag: v0.8.1~31 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=05b209dd724acddc9e4c4575817565c15a2fb6b5;p=mobile-ledger.git remove all data belonging to previously deleted accounts --- diff --git a/app/src/main/res/raw/sql_20.sql b/app/src/main/res/raw/sql_20.sql new file mode 100644 index 00000000..04855202 --- /dev/null +++ b/app/src/main/res/raw/sql_20.sql @@ -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