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 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": [], }, diff --git a/tests/_main_test.py b/tests/_main_test.py index 7323865..6292c1d 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": "everyOtherMonth", "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": "monthly", "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": "monthly", "amount": -2960, "amount_major": pytest.approx(2.96), },