alter table transaction_accounts add order_no integer not null default 0;
update transaction_accounts set order_no = rowid;
create unique index un_transaction_accounts_order on transaction_accounts(profile, transaction_id, order_no);
alter table transaction_accounts add order_no integer not null default 0;
update transaction_accounts set order_no = rowid;
create unique index un_transaction_accounts_order on transaction_accounts(profile, transaction_id, order_no);