X-Git-Url: https://git.ktnx.net/?p=mobile-ledger.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fres%2Fraw%2Fdb_59.sql;fp=app%2Fsrc%2Fmain%2Fres%2Fraw%2Fdb_59.sql;h=115f3ce9b4f5bb9a48feb2138b2e5964aa109b8e;hp=8f5d8009c7569a0008ea7ce6279c0cc840833cde;hb=9b96a8e36b9db5061ab49578cdbac1b465558dfa;hpb=87a1e58f79757bb0257c911e9bd77eb5d77a3e40 diff --git a/app/src/main/res/raw/db_59.sql b/app/src/main/res/raw/db_59.sql index 8f5d8009..115f3ce9 100644 --- a/app/src/main/res/raw/db_59.sql +++ b/app/src/main/res/raw/db_59.sql @@ -153,8 +153,10 @@ create table transaction_accounts_new( insert into transaction_accounts_new(transaction_id, order_no, account_name, currency, amount, comment, generation) -select ta.transaction_id, ta.order_no, ta.account_name, ta.currency, ta.amount, ta.comment, ta.generation -from transaction_accounts ta; +select t.id, ta.order_no, ta.account_name, ta.currency, ta.amount, ta.comment, ta.generation +from transaction_accounts ta +join profiles p in ta.profile=p.deprecated_uuid +join transactions t on ta.transaction_id = t.ledger_id and t.profile_id=p.id; drop table transaction_accounts; alter table transaction_accounts_new rename to transaction_accounts;