made bill_freq have simple / hard-coded number of bills for a year, e.g. annual == 1, monthly == 12, etc)
This commit is contained in:
9
db.py
9
db.py
@@ -94,7 +94,8 @@ def init_db():
|
|||||||
|
|
||||||
cur.execute('''CREATE TABLE IF NOT EXISTS bill_freq (
|
cur.execute('''CREATE TABLE IF NOT EXISTS bill_freq (
|
||||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
name STRING
|
name STRING,
|
||||||
|
num_bills_per_annum INTEGER
|
||||||
)''')
|
)''')
|
||||||
|
|
||||||
cur.execute('''CREATE TABLE IF NOT EXISTS bill_data (
|
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)
|
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 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)''',
|
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))
|
(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 ( 1, 'Annual', 1 )" )
|
||||||
cur.execute( "INSERT INTO bill_freq values ( 2, 'Quarterly' )" )
|
cur.execute( "INSERT INTO bill_freq values ( 2, 'Quarterly', 4 )" )
|
||||||
cur.execute( "INSERT INTO bill_freq values ( 3, 'Monthly' )" )
|
cur.execute( "INSERT INTO bill_freq values ( 3, 'Monthly', 12 )" )
|
||||||
conn.commit()
|
conn.commit()
|
||||||
conn.close()
|
conn.close()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user