diff options
Diffstat (limited to 'rust/actualbudget_queries/README.md')
| -rw-r--r-- | rust/actualbudget_queries/README.md | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/rust/actualbudget_queries/README.md b/rust/actualbudget_queries/README.md new file mode 100644 index 0000000..d16fa30 --- /dev/null +++ b/rust/actualbudget_queries/README.md @@ -0,0 +1,71 @@ +# Actualbudget Queries + +This is a Rust library defining queries for querying an Actualbudget database +export. + +## Creating the test database + +To re-create the test database from scratch: + +1. Open an instance of Actualbudget +2. Start a new file +3. Add a new local account, called 'My bank account', with an initial balance of + 1200.00 +4. Add a new local account, called 'My cash account', with an initial balance of + 45.10 +5. Add a new local account, called 'Category transfers', with an initial balance + of nil +6. Move the Starting Balance transaction for both to 1 Aug 2024 +6. Go to the Budgets tab +7. Adjust the budgets for the existing categories for August 2024: + - Usual Expenses, under which: + - Food: 200 + - General: 100 + - Bills: 125 + - Bills (flexible): 25 + - Investments and Savings, under which: + - Savings: 400 +8. Add transactions for Income for 846.46 in the 'My bank account' on 21 Aug, + Sept, Oct and Nov 2024, with the 'Note' column set to 'Salary', ticking the + 'cleared' box +9. On 10 Sept 2024, add a transaction in 'My bank account' transferring 80.00 to + 'My cash account' with no Note, and tick the 'cleared' box +10. Add transactions for 200.00 to 'Tesco' in 'My bank account', categorised as + 'Food', for 8 Aug, Sept, Oct, and Nov 2024 +11. In the 'Category transfers' account, add a transaction for 23rd Oct 2024, + transferring 120.00 from 'Savings' to 'General' +12. +12. Export the database by going to Settings > Export data +13. Download the resulting ZIP archive +14. Extract `db.sqlite` and `metadata.json` +15. Move them to + `actualbudget_queries/tests/resources/actualbudget_test_db.sqlite` and + `actualbudget_queries/tests/resources/actualbudget_test_db_metadata.json` + respectively, overwriting the files which are already there +16. Format the JSON in `actualbudget_test_db_metadata.json` to minimise diffs + +## Updating the test database + +To make a change to the test database: + +1. Make a copy of `actualbudget_test_db_metadata.json` and rename it to + `metadata.json` +2. Make a copy of `actualbudget_test_db.sqlite` and rename it to `db.sqlite` +3. Compress these files together in a `.zip` archive +4. Open an instance of Actualbudget +5. If you have a file open, close it +6. Choose 'Import file' +7. Choose to import an 'Actual' file +8. Choose the ZIP archive you just made +9. This should open the file +10. Make your edits +11. Document your edits in + [the database creation guide](#creating-the-test-database) +12. Export the database by going to Settings > Export data +13. Download the resulting ZIP archive +14. Extract the `.sqlite` database file +15. Move them to + `actualbudget_queries/tests/resources/actualbudget_test_db.sqlite` and + `actualbudget_queries/tests/resources/actualbudget_test_db_metadata.json` + respectively, overwriting the files which are already there +16. Format the JSON in `actualbudget_test_db_metadata.json` to minimise diffs |
