mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-08 21:14:49 +08:00
28 lines
1.0 KiB
Python
28 lines
1.0 KiB
Python
from typing import Any, Optional, Set, Tuple, Union
|
|
|
|
from django.db import DefaultConnectionProxy, models
|
|
from django.db.backends.base.base import BaseDatabaseWrapper
|
|
from django.db.models.query import QuerySet
|
|
|
|
from .exceptions import MigrationSchemaMissing
|
|
|
|
class MigrationRecorder:
|
|
class Migration(models.Model):
|
|
app: Any = ...
|
|
name: Any = ...
|
|
applied: Any = ...
|
|
class Meta:
|
|
apps: Any = ...
|
|
app_label: str = ...
|
|
db_table: str = ...
|
|
connection: django.db.backends.sqlite3.base.DatabaseWrapper = ...
|
|
def __init__(self, connection: Optional[Union[DefaultConnectionProxy, BaseDatabaseWrapper]]) -> None: ...
|
|
@property
|
|
def migration_qs(self) -> QuerySet: ...
|
|
def has_table(self) -> bool: ...
|
|
def ensure_schema(self) -> None: ...
|
|
def applied_migrations(self) -> Set[Tuple[str, str]]: ...
|
|
def record_applied(self, app: str, name: str) -> None: ...
|
|
def record_unapplied(self, app: str, name: str) -> None: ...
|
|
def flush(self) -> None: ...
|