feat(expense): add persistent zero-entry receipt association

This commit is contained in:
caoxiaozhu
2026-07-16 10:23:23 +08:00
parent 54754b5502
commit ae3f02c35a
30 changed files with 4450 additions and 810 deletions

View File

@@ -48,7 +48,7 @@ def test_unversioned_database_without_migration_owned_tables_is_safe(engine: Eng
@pytest.mark.parametrize(
"owned_table",
sorted(MIGRATION_OWNED_TABLES_BY_REVISION["20260714_0005"]),
sorted(MIGRATION_OWNED_TABLES_BY_REVISION["20260716_0006"]),
)
def test_unversioned_database_with_any_migration_owned_table_is_rejected(
engine: Engine,
@@ -100,6 +100,11 @@ def test_known_revision_requires_and_accepts_its_exact_owned_table_set(
"20260714_0005",
MIGRATION_OWNED_TABLES_BY_REVISION["20260714_0005"] - {"memory_entries"},
),
(
"20260716_0006",
MIGRATION_OWNED_TABLES_BY_REVISION["20260716_0006"]
- {"attachment_association_jobs"},
),
],
)
def test_known_revision_with_missing_or_unexpected_owned_tables_is_rejected(