File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
plain-models/plain/models/migrations Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 44from contextlib import nullcontext
55from typing import TYPE_CHECKING , Any
66
7+ from plain .models .connections import DatabaseConnection
8+
79from ..transaction import atomic
810from .loader import MigrationLoader
911from .migration import Migration
@@ -22,7 +24,7 @@ class MigrationExecutor:
2224
2325 def __init__ (
2426 self ,
25- connection : BaseDatabaseWrapper ,
27+ connection : BaseDatabaseWrapper | DatabaseConnection ,
2628 progress_callback : Callable [..., Any ] | None = None ,
2729 ) -> None :
2830 self .connection = connection
Original file line number Diff line number Diff line change @@ -317,7 +317,9 @@ def build_graph(self) -> None:
317317 raise
318318 self .graph .ensure_not_cyclic ()
319319
320- def check_consistent_history (self , connection : BaseDatabaseWrapper ) -> None :
320+ def check_consistent_history (
321+ self , connection : BaseDatabaseWrapper | DatabaseConnection
322+ ) -> None :
321323 """
322324 Raise InconsistentMigrationHistory if any applied migrations have
323325 unapplied dependencies.
You can’t perform that action at this time.
0 commit comments