From 069c0b21efea78f0b9ac3f9105c500822a126b46 Mon Sep 17 00:00:00 2001 From: Max R Date: Wed, 23 Jul 2025 14:22:53 -0400 Subject: [PATCH 1/4] Update create-relations.sql --- sqlite_export_for_ynab/ddl/create-relations.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/sqlite_export_for_ynab/ddl/create-relations.sql b/sqlite_export_for_ynab/ddl/create-relations.sql index 5ad0c4d..05930b1 100644 --- a/sqlite_export_for_ynab/ddl/create-relations.sql +++ b/sqlite_export_for_ynab/ddl/create-relations.sql @@ -248,6 +248,7 @@ SELECT , t.date_next , t.flag_color , t.flag_name + , t.frequency , COALESCE(st.payee_name, t.payee_name) AS payee_name , COALESCE(st.id, t.id) AS id , COALESCE(st.amount, t.amount) AS amount From 3f545a2a6ac3b164c6cb7fbcffc99ab99cc18e27 Mon Sep 17 00:00:00 2001 From: Max R Date: Wed, 23 Jul 2025 14:24:45 -0400 Subject: [PATCH 2/4] Update fixtures.py --- testing/fixtures.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/testing/fixtures.py b/testing/fixtures.py index 6784146..2da5364 100644 --- a/testing/fixtures.py +++ b/testing/fixtures.py @@ -196,6 +196,7 @@ { "id": SCHEDULED_TRANSACTION_ID_1, "amount": -12000, + "frequency": "monthly", "deleted": False, "subtransactions": [ { @@ -215,12 +216,14 @@ { "id": SCHEDULED_TRANSACTION_ID_2, "amount": -11000, + "frequency": "yearly", "deleted": True, "subtransactions": [], }, { "id": SCHEDULED_TRANSACTION_ID_3, "amount": -9000, + "frequency": "everyOtherMonth", "deleted": False, "subtransactions": [], }, From 228c73374eefdf074a67cf68b341cc8d1f0f3602 Mon Sep 17 00:00:00 2001 From: Max R Date: Wed, 23 Jul 2025 14:25:58 -0400 Subject: [PATCH 3/4] Update _main_test.py --- tests/_main_test.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/_main_test.py b/tests/_main_test.py index 7323865..7e7b7e8 100644 --- a/tests/_main_test.py +++ b/tests/_main_test.py @@ -337,18 +337,21 @@ def test_insert_scheduled_transactions(cur): { "id": SCHEDULED_TRANSACTION_ID_1, "budget_id": BUDGET_ID_1, + "frequency": "monthly", "amount": -12000, "deleted": False, }, { "id": SCHEDULED_TRANSACTION_ID_2, "budget_id": BUDGET_ID_1, + "frequency": "yearly", "amount": -11000, "deleted": True, }, { "id": SCHEDULED_TRANSACTION_ID_3, "budget_id": BUDGET_ID_1, + "frequency": "everyOtherMonth", "amount": -9000, "deleted": False, }, @@ -378,6 +381,7 @@ def test_insert_scheduled_transactions(cur): "transaction_id": SCHEDULED_TRANSACTION_ID_3, "budget_id": BUDGET_ID_1, "id": SCHEDULED_TRANSACTION_ID_3, + "frequency": "monthly", "amount": -9000, "amount_major": pytest.approx(9), }, @@ -386,6 +390,7 @@ def test_insert_scheduled_transactions(cur): "subtransaction_id": SCHEDULED_SUBTRANSACTION_ID_1, "budget_id": BUDGET_ID_1, "id": SCHEDULED_SUBTRANSACTION_ID_1, + "frequency": "yearly", "amount": -8040, "amount_major": pytest.approx(8.04), }, @@ -394,6 +399,7 @@ def test_insert_scheduled_transactions(cur): "subtransaction_id": SCHEDULED_SUBTRANSACTION_ID_2, "budget_id": BUDGET_ID_1, "id": SCHEDULED_SUBTRANSACTION_ID_2, + "frequency": "everyOtherMonth", "amount": -2960, "amount_major": pytest.approx(2.96), }, From de265a7aa1ab3ce68785e80b0246bcd556831c08 Mon Sep 17 00:00:00 2001 From: Max R Date: Wed, 23 Jul 2025 22:13:35 -0400 Subject: [PATCH 4/4] fix --- tests/_main_test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/_main_test.py b/tests/_main_test.py index 7e7b7e8..6292c1d 100644 --- a/tests/_main_test.py +++ b/tests/_main_test.py @@ -381,7 +381,7 @@ def test_insert_scheduled_transactions(cur): "transaction_id": SCHEDULED_TRANSACTION_ID_3, "budget_id": BUDGET_ID_1, "id": SCHEDULED_TRANSACTION_ID_3, - "frequency": "monthly", + "frequency": "everyOtherMonth", "amount": -9000, "amount_major": pytest.approx(9), }, @@ -390,7 +390,7 @@ def test_insert_scheduled_transactions(cur): "subtransaction_id": SCHEDULED_SUBTRANSACTION_ID_1, "budget_id": BUDGET_ID_1, "id": SCHEDULED_SUBTRANSACTION_ID_1, - "frequency": "yearly", + "frequency": "monthly", "amount": -8040, "amount_major": pytest.approx(8.04), }, @@ -399,7 +399,7 @@ def test_insert_scheduled_transactions(cur): "subtransaction_id": SCHEDULED_SUBTRANSACTION_ID_2, "budget_id": BUDGET_ID_1, "id": SCHEDULED_SUBTRANSACTION_ID_2, - "frequency": "everyOtherMonth", + "frequency": "monthly", "amount": -2960, "amount_major": pytest.approx(2.96), },