From 1f5dcf9762a83d5972c0c8dbad22732505bf621c Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Sun, 24 Nov 2024 15:45:04 +0000 Subject: Swaps budget updates for budget drips --- rust/schist_models/src/schema.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'rust/schist_models/src/schema.rs') diff --git a/rust/schist_models/src/schema.rs b/rust/schist_models/src/schema.rs index 372f8f3..5164d07 100644 --- a/rust/schist_models/src/schema.rs +++ b/rust/schist_models/src/schema.rs @@ -10,12 +10,11 @@ diesel::table! { } diesel::table! { - budget_updates (id) { + budget_drips (id) { id -> Integer, category_id -> Integer, date -> Text, - new_budget -> Integer, - new_period -> Integer, + quantity -> Integer, } } @@ -23,6 +22,11 @@ diesel::table! { categories (id) { id -> Integer, name -> Text, + balance -> Integer, + balance_date -> Text, + budget_period -> Integer, + budget_period_unit -> Text, + budget_quantity -> Integer, } } @@ -57,14 +61,14 @@ diesel::table! { } } -diesel::joinable!(budget_updates -> categories (category_id)); +diesel::joinable!(budget_drips -> categories (category_id)); diesel::joinable!(transaction_categorisations -> categories (category_id)); diesel::joinable!(transaction_categorisations -> transactions (transaction_id)); diesel::joinable!(transactions -> accounts (account_id)); diesel::allow_tables_to_appear_in_same_query!( accounts, - budget_updates, + budget_drips, categories, category_transfers, transaction_categorisations, -- cgit v1.2.3