from typing import Any, Optional, Type, Union

from django.db.backends.base.schema import BaseDatabaseSchemaEditor
from django.db.models.base import Model
from django.db.models.fields import Field

class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
    atomic_migration: bool
    collect_sql: bool
    connection: Any
    sql_delete_table: str = ...
    sql_create_fk: Any = ...
    sql_create_inline_fk: str = ...
    sql_create_unique: str = ...
    sql_delete_unique: str = ...
    def __enter__(self) -> DatabaseSchemaEditor: ...
    def __exit__(self, exc_type: None, exc_value: None, traceback: None) -> None: ...
    def quote_value(self, value: Optional[Union[int, str]]) -> str: ...
    def alter_db_table(
        self, model: Type[Model], old_db_table: str, new_db_table: str, disable_constraints: bool = ...
    ) -> None: ...
    def alter_field(self, model: Type[Model], old_field: Field, new_field: Field, strict: bool = ...) -> None: ...
    def delete_model(self, model: Type[Model], handle_autom2m: bool = ...) -> None: ...
    def add_field(self, model: Type[Model], field: Field) -> None: ...
    def remove_field(self, model: Type[Model], field: Field) -> None: ...
