X-Git-Url: https://git.ktnx.net/?a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fres%2Fraw%2Fsql_40.sql;h=0d6d5da2a42183639d74ba79ec08859fef15cef1;hb=390a653a4424bd146f73bca3e421a0be252ee443;hp=18a350a0f084ec0b683f2314f8591de62019c7e9;hpb=b9b4e569e4f3988435533445e32282ae5ca69577;p=mobile-ledger.git diff --git a/app/src/main/res/raw/sql_40.sql b/app/src/main/res/raw/sql_40.sql index 18a350a0..0d6d5da2 100644 --- a/app/src/main/res/raw/sql_40.sql +++ b/app/src/main/res/raw/sql_40.sql @@ -13,5 +13,9 @@ -- You should have received a copy of the GNU General Public License -- along with MoLe. If not, see . pragma foreign_keys=off; +BEGIN TRANSACTION; + delete from transaction_accounts where not exists (select 1 from accounts a where a.profile=transaction_accounts.profile and a.name=transaction_accounts.account_name); -delete from transaction_accounts where not exists (select 1 from transactions t where t.profile=transaction_accounts.profile and t.id=transaction_accounts.transaction_id); \ No newline at end of file +delete from transaction_accounts where not exists (select 1 from transactions t where t.profile=transaction_accounts.profile and t.id=transaction_accounts.transaction_id); + +COMMIT TRANSACTION; \ No newline at end of file