The export and restore forms now sit on the Export and Restore page
instead of an offcanvas. Exporting shows a progress line and a toast
when the download starts; restoring splits ZIP and CSV uploads into
tabs and shows errors in the form.
- An empty export warns instead of downloading the message as a file
- Export errors show a message instead of a stuck spinner
- The download link is kept long enough for Safari to save the file
- Non-superusers get a 403 instead of a redirect loop with the login
- The asset classes CSV can be uploaded on its own
- Drop the export form's unknown investment_classes layout field
Restore looked categories, tags and entities up through the admin's
filtered manager, so other users' transactions moved to the admin's
categories and lost their tags. They are now matched to the row's
owner (then to ones that owner can see) and created for that owner.
Export also read tags and entities through that manager and left other
users' private ones out.
Recurring transactions and installment plans now export account_owner,
which restore already read but never received.
Transaction exports ran a few queries per row and paged prefetched rows
with OFFSET, so large histories timed out. They now load relations up
front and read in cursor chunks: 200k transactions export in ~43s with
~200 queries (10k took 34s and ~21k queries before).
Fixes#691Fixes#692
Restore asset classes before accounts and take a second pass over accounts
once categories, tags and entities exist, so their links survive a restore
into a fresh install.