From 232f16deba57311ce4155eac4b89d941782034a3 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Mon, 18 Aug 2025 17:45:20 +1000 Subject: [PATCH] made bill_freq have simple / hard-coded number of bills for a year, e.g. annual == 1, monthly == 12, etc) --- db.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/db.py b/db.py index b9f7ed7..8df61b6 100644 --- a/db.py +++ b/db.py @@ -94,7 +94,8 @@ def init_db(): cur.execute('''CREATE TABLE IF NOT EXISTS bill_freq ( id INTEGER PRIMARY KEY AUTOINCREMENT, - name STRING + name STRING, + num_bills_per_annum INTEGER )''') cur.execute('''CREATE TABLE IF NOT EXISTS bill_data ( @@ -121,9 +122,9 @@ def init_db(): Inflation, Mich_present, Overseas_trip, Mark_reno, D_leave_owed_in_days, D_TLS_shares, M_TLS_shares, D_CBA_shares, TLS_price, CBA_price, Overseas_trip_date, Mark_reno_date, Car_buyout_date, Sell_shares, compare_to, Ioniq6_future) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)''', (4762.29, 10, 24000, 620, 2412, 45824.68, 83738.74, 80000, 424875.26, 4.75, 2.4, 10000, 50000, 10000, 76.85, 1000, 750, 1111, 4.52, 163.32, '2025-06-01', '2025-09-01', '2025-02-20', 4, 0, 0)) - cur.execute( "INSERT INTO bill_freq values ( 1, 'Annual' )" ) - cur.execute( "INSERT INTO bill_freq values ( 2, 'Quarterly' )" ) - cur.execute( "INSERT INTO bill_freq values ( 3, 'Monthly' )" ) + cur.execute( "INSERT INTO bill_freq values ( 1, 'Annual', 1 )" ) + cur.execute( "INSERT INTO bill_freq values ( 2, 'Quarterly', 4 )" ) + cur.execute( "INSERT INTO bill_freq values ( 3, 'Monthly', 12 )" ) conn.commit() conn.close()