From 57764eec0350b5db67141b0f3f29bdad7b19637a Mon Sep 17 00:00:00 2001 From: Codex Date: Wed, 14 Oct 2026 19:42:49 +0200 Subject: [PATCH] Restore current schema after historical migration tests --- inventory/test_specification_migration.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/inventory/test_specification_migration.py b/inventory/test_specification_migration.py index 888812a..03d569a 100644 --- a/inventory/test_specification_migration.py +++ b/inventory/test_specification_migration.py @@ -40,7 +40,8 @@ class SpecificationMigrationTests(TransactionTestCase): self.assertEqual(str(Monitor.objects.get(device_id=screen_id).display_inches), "24.0") self.assertFalse(Computer.objects.filter(device_id=printer_id).exists()) finally: - MigrationExecutor(connection).migrate(LATEST) + executor = MigrationExecutor(connection) + executor.migrate(executor.loader.graph.leaf_nodes()) class DeviceTypeTableMigrationTests(TransactionTestCase): @@ -69,4 +70,5 @@ class DeviceTypeTableMigrationTests(TransactionTestCase): self.assertFalse(Computer.objects.filter(device_id__in=ids.values()).exclude(device_id=ids["Sondergerät"]).exists()) self.assertTrue(Computer.objects.filter(device_id=ids["Sondergerät"]).exists()) finally: - MigrationExecutor(connection).migrate(LATEST) + executor = MigrationExecutor(connection) + executor.migrate(executor.loader.graph.leaf_nodes())