diff --git a/tests/migrations/test_schema.py b/tests/migrations/test_schema.py index fcf9092..61db0ba 100644 --- a/tests/migrations/test_schema.py +++ b/tests/migrations/test_schema.py @@ -73,3 +73,16 @@ def test_fi_versioning_tables_3f893e52d05c(alembic_runner: MigrationContext, ale assert "version" in [column.get("name") for column in fi_columns] mapping_columns = inspector.get_columns("fi_to_type_mapping") assert "version" in [column.get("name") for column in mapping_columns] + + +def test_fi_history_table_columns_8106d83ff594(alembic_runner: MigrationContext, alembic_engine: Engine): + alembic_runner.migrate_up_to("8106d83ff594") + inspector = sqlalchemy.inspect(alembic_engine) + fi_columns = inspector.get_columns("financial_institutions") + mapping_columns = inspector.get_columns("fi_to_type_mapping") + fi_history_columns = inspector.get_columns("financial_institutions_history") + mapping_history_columns = inspector.get_columns("fi_to_type_mapping_history") + assert {column.get("name") for column in fi_columns}.issubset({column.get("name") for column in fi_history_columns}) + assert {column.get("name") for column in mapping_columns}.issubset( + {column.get("name") for column in mapping_history_columns} + )