M5-T02: add modbus_device and modbus_reading tables and models

This commit is contained in:
2026-06-22 12:45:50 +02:00
parent eac7860b51
commit d9c82e39fb
7 changed files with 598 additions and 4 deletions
+4 -2
View File
@@ -262,8 +262,10 @@ def test_downgrade_removes_totp_columns_and_table(tmp_path: Path):
assert "totp_enabled" in auth_user_cols
engine.dispose()
# Downgrade one step (removes TOTP migration).
command.downgrade(alembic_cfg, "-1")
# Downgrade to the revision before TOTP (removes TOTP migration).
# We use an explicit target rather than "-1" so the test stays correct even
# as new revisions are added on top of the TOTP revision.
command.downgrade(alembic_cfg, "20260621_07_auth_login_throttle")
engine = create_engine(db_url, connect_args={"check_same_thread": False})
inspector = inspect(engine)