mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-10 05:51:53 +08:00
move generated stubs to separate directory, too messty
This commit is contained in:
64
django-stubs-generated/db/migrations/operations/__init__.pyi
Normal file
64
django-stubs-generated/db/migrations/operations/__init__.pyi
Normal file
@@ -0,0 +1,64 @@
|
||||
# Stubs for django.db.migrations.operations (Python 3.6)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from .fields import (
|
||||
AddField as AddField,
|
||||
AlterField as AlterField,
|
||||
RemoveField as RemoveField,
|
||||
RenameField as RenameField,
|
||||
)
|
||||
from .models import (
|
||||
AddIndex as AddIndex,
|
||||
AlterIndexTogether as AlterIndexTogether,
|
||||
AlterModelManagers as AlterModelManagers,
|
||||
AlterModelOptions as AlterModelOptions,
|
||||
AlterModelTable as AlterModelTable,
|
||||
AlterOrderWithRespectTo as AlterOrderWithRespectTo,
|
||||
AlterUniqueTogether as AlterUniqueTogether,
|
||||
CreateModel as CreateModel,
|
||||
DeleteModel as DeleteModel,
|
||||
RemoveIndex as RemoveIndex,
|
||||
RenameModel as RenameModel,
|
||||
)
|
||||
from .special import (
|
||||
RunPython as RunPython,
|
||||
RunSQL as RunSQL,
|
||||
SeparateDatabaseAndState as SeparateDatabaseAndState,
|
||||
)
|
||||
from .fields import AddField, AlterField, RemoveField, RenameField
|
||||
from .models import (
|
||||
AddIndex,
|
||||
AlterIndexTogether,
|
||||
AlterModelManagers,
|
||||
AlterModelOptions,
|
||||
AlterModelTable,
|
||||
AlterOrderWithRespectTo,
|
||||
AlterUniqueTogether,
|
||||
CreateModel,
|
||||
DeleteModel,
|
||||
RemoveIndex,
|
||||
RenameModel,
|
||||
)
|
||||
from .special import RunPython, RunSQL, SeparateDatabaseAndState
|
||||
|
||||
__all__ = [
|
||||
"CreateModel",
|
||||
"DeleteModel",
|
||||
"AlterModelTable",
|
||||
"AlterUniqueTogether",
|
||||
"RenameModel",
|
||||
"AlterIndexTogether",
|
||||
"AlterModelOptions",
|
||||
"AddIndex",
|
||||
"RemoveIndex",
|
||||
"AddField",
|
||||
"RemoveField",
|
||||
"AlterField",
|
||||
"RenameField",
|
||||
"SeparateDatabaseAndState",
|
||||
"RunSQL",
|
||||
"RunPython",
|
||||
"AlterOrderWithRespectTo",
|
||||
"AlterModelManagers",
|
||||
]
|
||||
32
django-stubs-generated/db/migrations/operations/base.pyi
Normal file
32
django-stubs-generated/db/migrations/operations/base.pyi
Normal file
@@ -0,0 +1,32 @@
|
||||
from typing import Any, List, Optional, Type
|
||||
|
||||
|
||||
class Operation:
|
||||
reversible: bool = ...
|
||||
reduces_to_sql: bool = ...
|
||||
atomic: bool = ...
|
||||
elidable: bool = ...
|
||||
serialization_expand_args: Any = ...
|
||||
def __new__(
|
||||
cls: Type[Operation], *args: Any, **kwargs: Any
|
||||
) -> Operation: ...
|
||||
def deconstruct(self): ...
|
||||
def state_forwards(self, app_label: Any, state: Any) -> None: ...
|
||||
def database_forwards(
|
||||
self, app_label: Any, schema_editor: Any, from_state: Any, to_state: Any
|
||||
) -> None: ...
|
||||
def database_backwards(
|
||||
self, app_label: Any, schema_editor: Any, from_state: Any, to_state: Any
|
||||
) -> None: ...
|
||||
def describe(self): ...
|
||||
def references_model(self, name: str, app_label: str = ...) -> bool: ...
|
||||
def references_field(
|
||||
self, model_name: str, name: str, app_label: str = ...
|
||||
) -> bool: ...
|
||||
def allow_migrate_model(self, connection_alias: Any, model: Any): ...
|
||||
def reduce(
|
||||
self,
|
||||
operation: Operation,
|
||||
in_between: List[Operation],
|
||||
app_label: str = ...,
|
||||
) -> bool: ...
|
||||
145
django-stubs-generated/db/migrations/operations/fields.pyi
Normal file
145
django-stubs-generated/db/migrations/operations/fields.pyi
Normal file
@@ -0,0 +1,145 @@
|
||||
from typing import Any, Dict, List, Optional, Tuple, Union
|
||||
|
||||
from django.db.backends.sqlite3.schema import DatabaseSchemaEditor
|
||||
from django.db.migrations.operations.base import Operation
|
||||
from django.db.migrations.state import ProjectState
|
||||
from django.db.models.fields import Field, SlugField
|
||||
|
||||
from .base import Operation
|
||||
from .utils import is_referenced_by_foreign_key
|
||||
|
||||
|
||||
class FieldOperation(Operation):
|
||||
model_name: Any = ...
|
||||
name: Any = ...
|
||||
def __init__(self, model_name: str, name: str) -> None: ...
|
||||
def model_name_lower(self) -> str: ...
|
||||
def name_lower(self) -> str: ...
|
||||
def is_same_model_operation(self, operation: FieldOperation) -> bool: ...
|
||||
def is_same_field_operation(self, operation: AddField) -> bool: ...
|
||||
def references_model(
|
||||
self, name: str, app_label: Optional[str] = ...
|
||||
) -> bool: ...
|
||||
def references_field(
|
||||
self, model_name: str, name: str, app_label: str = ...
|
||||
) -> bool: ...
|
||||
def reduce(
|
||||
self,
|
||||
operation: Operation,
|
||||
in_between: List[Operation],
|
||||
app_label: str = ...,
|
||||
) -> bool: ...
|
||||
|
||||
class AddField(FieldOperation):
|
||||
field: Any = ...
|
||||
preserve_default: Any = ...
|
||||
def __init__(
|
||||
self,
|
||||
model_name: str,
|
||||
name: str,
|
||||
field: Field,
|
||||
preserve_default: bool = ...,
|
||||
) -> None: ...
|
||||
def deconstruct(
|
||||
self
|
||||
) -> Tuple[str, List[Any], Dict[str, Union[bool, Field, str]]]: ...
|
||||
def state_forwards(self, app_label: str, state: ProjectState) -> None: ...
|
||||
def database_forwards(
|
||||
self,
|
||||
app_label: str,
|
||||
schema_editor: DatabaseSchemaEditor,
|
||||
from_state: ProjectState,
|
||||
to_state: ProjectState,
|
||||
) -> None: ...
|
||||
def database_backwards(
|
||||
self,
|
||||
app_label: str,
|
||||
schema_editor: DatabaseSchemaEditor,
|
||||
from_state: ProjectState,
|
||||
to_state: ProjectState,
|
||||
) -> None: ...
|
||||
def describe(self) -> str: ...
|
||||
def reduce(
|
||||
self,
|
||||
operation: Operation,
|
||||
in_between: List[Operation],
|
||||
app_label: str = ...,
|
||||
) -> bool: ...
|
||||
|
||||
class RemoveField(FieldOperation):
|
||||
model_name: str
|
||||
model_name_lower: str
|
||||
name: str
|
||||
def deconstruct(self) -> Tuple[str, List[Any], Dict[str, str]]: ...
|
||||
def state_forwards(self, app_label: str, state: ProjectState) -> None: ...
|
||||
def database_forwards(
|
||||
self,
|
||||
app_label: str,
|
||||
schema_editor: DatabaseSchemaEditor,
|
||||
from_state: ProjectState,
|
||||
to_state: ProjectState,
|
||||
) -> None: ...
|
||||
def database_backwards(
|
||||
self,
|
||||
app_label: str,
|
||||
schema_editor: DatabaseSchemaEditor,
|
||||
from_state: ProjectState,
|
||||
to_state: ProjectState,
|
||||
) -> None: ...
|
||||
def describe(self) -> str: ...
|
||||
|
||||
class AlterField(FieldOperation):
|
||||
field: Any = ...
|
||||
preserve_default: Any = ...
|
||||
def __init__(
|
||||
self,
|
||||
model_name: str,
|
||||
name: str,
|
||||
field: Field,
|
||||
preserve_default: bool = ...,
|
||||
) -> None: ...
|
||||
def deconstruct(
|
||||
self
|
||||
) -> Tuple[str, List[Any], Dict[str, Union[SlugField, str]]]: ...
|
||||
def state_forwards(self, app_label: str, state: ProjectState) -> None: ...
|
||||
def database_forwards(
|
||||
self,
|
||||
app_label: str,
|
||||
schema_editor: DatabaseSchemaEditor,
|
||||
from_state: ProjectState,
|
||||
to_state: ProjectState,
|
||||
) -> None: ...
|
||||
def database_backwards(
|
||||
self, app_label: Any, schema_editor: Any, from_state: Any, to_state: Any
|
||||
) -> None: ...
|
||||
def describe(self) -> str: ...
|
||||
def reduce(
|
||||
self,
|
||||
operation: Operation,
|
||||
in_between: List[AlterField],
|
||||
app_label: str = ...,
|
||||
) -> bool: ...
|
||||
|
||||
class RenameField(FieldOperation):
|
||||
old_name: Any = ...
|
||||
new_name: Any = ...
|
||||
def __init__(
|
||||
self, model_name: str, old_name: str, new_name: str
|
||||
) -> None: ...
|
||||
def old_name_lower(self): ...
|
||||
def new_name_lower(self) -> str: ...
|
||||
def deconstruct(self): ...
|
||||
def state_forwards(self, app_label: Any, state: Any) -> None: ...
|
||||
def database_forwards(
|
||||
self, app_label: Any, schema_editor: Any, from_state: Any, to_state: Any
|
||||
) -> None: ...
|
||||
def database_backwards(
|
||||
self, app_label: Any, schema_editor: Any, from_state: Any, to_state: Any
|
||||
) -> None: ...
|
||||
def describe(self): ...
|
||||
def references_field(
|
||||
self, model_name: str, name: str, app_label: str = ...
|
||||
) -> bool: ...
|
||||
def reduce(
|
||||
self, operation: Operation, in_between: List[Any], app_label: str = ...
|
||||
) -> bool: ...
|
||||
370
django-stubs-generated/db/migrations/operations/models.pyi
Normal file
370
django-stubs-generated/db/migrations/operations/models.pyi
Normal file
@@ -0,0 +1,370 @@
|
||||
from typing import Any, Dict, List, Optional, Set, Tuple, Type, Union
|
||||
|
||||
from django.contrib.postgres.fields.citext import CIText
|
||||
from django.db.backends.sqlite3.schema import DatabaseSchemaEditor
|
||||
from django.db.migrations.operations.base import Operation
|
||||
from django.db.migrations.state import ProjectState
|
||||
from django.db.models.fields import Field
|
||||
from django.db.models.indexes import Index
|
||||
from django.db.models.manager import Manager
|
||||
|
||||
|
||||
class ModelOperation(Operation):
|
||||
name: Any = ...
|
||||
|
||||
def __init__(self, name: str) -> None: ...
|
||||
|
||||
def name_lower(self) -> str: ...
|
||||
|
||||
def references_model(
|
||||
self, name: str, app_label: Optional[str] = ...
|
||||
) -> bool: ...
|
||||
|
||||
def reduce(
|
||||
self,
|
||||
operation: Operation,
|
||||
in_between: List[Operation],
|
||||
app_label: str = ...,
|
||||
) -> bool: ...
|
||||
|
||||
|
||||
class CreateModel(ModelOperation):
|
||||
serialization_expand_args: Any = ...
|
||||
fields: Any = ...
|
||||
options: Any = ...
|
||||
bases: Any = ...
|
||||
managers: Any = ...
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
name: str,
|
||||
fields: List[Tuple[str, Union[CIText, Field]]],
|
||||
options: Optional[Dict[str, Any]] = ...,
|
||||
bases: Optional[
|
||||
Union[Tuple[Type[Any], ...],
|
||||
Tuple[str, ...]]] = ...,
|
||||
managers: Optional[List[Tuple[str, Manager]]] = ...,
|
||||
) -> None: ...
|
||||
|
||||
def deconstruct(
|
||||
self
|
||||
) -> Tuple[
|
||||
str,
|
||||
List[Any],
|
||||
Dict[str, Union[Dict[str, str], List[Tuple[str, Field]], str]],
|
||||
]: ...
|
||||
|
||||
def state_forwards(self, app_label: str, state: ProjectState) -> None: ...
|
||||
|
||||
def database_forwards(
|
||||
self,
|
||||
app_label: str,
|
||||
schema_editor: DatabaseSchemaEditor,
|
||||
from_state: ProjectState,
|
||||
to_state: ProjectState,
|
||||
) -> None: ...
|
||||
|
||||
def database_backwards(
|
||||
self,
|
||||
app_label: str,
|
||||
schema_editor: DatabaseSchemaEditor,
|
||||
from_state: ProjectState,
|
||||
to_state: ProjectState,
|
||||
) -> None: ...
|
||||
|
||||
def describe(self) -> str: ...
|
||||
|
||||
def references_model(self, name: str, app_label: str = ...) -> bool: ...
|
||||
|
||||
def model_to_key(self, model: str) -> List[str]: ...
|
||||
|
||||
def reduce(
|
||||
self,
|
||||
operation: Operation,
|
||||
in_between: List[Operation],
|
||||
app_label: str = ...,
|
||||
) -> Union[List[CreateModel], bool]: ...
|
||||
|
||||
|
||||
class DeleteModel(ModelOperation):
|
||||
def deconstruct(self) -> Tuple[str, List[Any], Dict[str, str]]: ...
|
||||
|
||||
def state_forwards(self, app_label: str, state: ProjectState) -> None: ...
|
||||
|
||||
def database_forwards(
|
||||
self,
|
||||
app_label: str,
|
||||
schema_editor: DatabaseSchemaEditor,
|
||||
from_state: ProjectState,
|
||||
to_state: ProjectState,
|
||||
) -> None: ...
|
||||
|
||||
def database_backwards(
|
||||
self,
|
||||
app_label: str,
|
||||
schema_editor: DatabaseSchemaEditor,
|
||||
from_state: ProjectState,
|
||||
to_state: ProjectState,
|
||||
) -> None: ...
|
||||
|
||||
def describe(self) -> str: ...
|
||||
|
||||
|
||||
class RenameModel(ModelOperation):
|
||||
old_name: Any = ...
|
||||
new_name: Any = ...
|
||||
|
||||
def __init__(self, old_name: str, new_name: str) -> None: ...
|
||||
|
||||
def old_name_lower(self) -> str: ...
|
||||
|
||||
def new_name_lower(self) -> str: ...
|
||||
|
||||
def deconstruct(self): ...
|
||||
|
||||
def state_forwards(self, app_label: str, state: ProjectState) -> None: ...
|
||||
|
||||
def database_forwards(
|
||||
self,
|
||||
app_label: str,
|
||||
schema_editor: DatabaseSchemaEditor,
|
||||
from_state: ProjectState,
|
||||
to_state: ProjectState,
|
||||
) -> None: ...
|
||||
|
||||
def database_backwards(
|
||||
self,
|
||||
app_label: str,
|
||||
schema_editor: DatabaseSchemaEditor,
|
||||
from_state: ProjectState,
|
||||
to_state: ProjectState,
|
||||
) -> None: ...
|
||||
|
||||
def references_model(self, name: Any, app_label: Optional[Any] = ...): ...
|
||||
|
||||
def describe(self): ...
|
||||
|
||||
def reduce(
|
||||
self,
|
||||
operation: AlterModelTable,
|
||||
in_between: List[Any],
|
||||
app_label: str = ...,
|
||||
) -> bool: ...
|
||||
|
||||
|
||||
class AlterModelTable(ModelOperation):
|
||||
table: Any = ...
|
||||
|
||||
def __init__(self, name: str, table: Optional[str]) -> None: ...
|
||||
|
||||
def deconstruct(self): ...
|
||||
|
||||
def state_forwards(self, app_label: Any, state: Any) -> None: ...
|
||||
|
||||
def database_forwards(
|
||||
self, app_label: Any, schema_editor: Any, from_state: Any, to_state: Any
|
||||
) -> None: ...
|
||||
|
||||
def database_backwards(
|
||||
self, app_label: Any, schema_editor: Any, from_state: Any, to_state: Any
|
||||
): ...
|
||||
|
||||
def describe(self): ...
|
||||
|
||||
def reduce(
|
||||
self, operation: Any, in_between: Any, app_label: Optional[Any] = ...
|
||||
): ...
|
||||
|
||||
|
||||
class ModelOptionOperation(ModelOperation):
|
||||
def reduce(
|
||||
self,
|
||||
operation: Operation,
|
||||
in_between: List[DeleteModel],
|
||||
app_label: str = ...,
|
||||
) -> bool: ...
|
||||
|
||||
|
||||
class FieldRelatedOptionOperation(ModelOptionOperation):
|
||||
def reduce(
|
||||
self, operation: Operation, in_between: List[Any], app_label: str = ...
|
||||
) -> Union[List[Operation], bool]: ...
|
||||
|
||||
|
||||
class AlterUniqueTogether(FieldRelatedOptionOperation):
|
||||
option_name: str = ...
|
||||
unique_together: Any = ...
|
||||
|
||||
def __init__(
|
||||
self, name: str, unique_together: Set[Tuple[str, ...]]
|
||||
) -> None: ...
|
||||
|
||||
def deconstruct(
|
||||
self
|
||||
) -> Tuple[str, List[Any], Dict[str, Union[Set[Tuple[str, str]], str]]]: ...
|
||||
|
||||
def state_forwards(self, app_label: str, state: ProjectState) -> None: ...
|
||||
|
||||
def database_forwards(
|
||||
self,
|
||||
app_label: str,
|
||||
schema_editor: DatabaseSchemaEditor,
|
||||
from_state: ProjectState,
|
||||
to_state: ProjectState,
|
||||
) -> None: ...
|
||||
|
||||
def database_backwards(
|
||||
self,
|
||||
app_label: str,
|
||||
schema_editor: DatabaseSchemaEditor,
|
||||
from_state: ProjectState,
|
||||
to_state: ProjectState,
|
||||
) -> None: ...
|
||||
|
||||
def references_field(
|
||||
self, model_name: str, name: str, app_label: Optional[str] = ...
|
||||
) -> bool: ...
|
||||
|
||||
def describe(self) -> str: ...
|
||||
|
||||
|
||||
class AlterIndexTogether(FieldRelatedOptionOperation):
|
||||
option_name: str = ...
|
||||
index_together: Any = ...
|
||||
|
||||
def __init__(
|
||||
self, name: str, index_together: Set[Tuple[str, str]]
|
||||
) -> None: ...
|
||||
|
||||
def deconstruct(self): ...
|
||||
|
||||
def state_forwards(self, app_label: Any, state: Any) -> None: ...
|
||||
|
||||
def database_forwards(
|
||||
self, app_label: Any, schema_editor: Any, from_state: Any, to_state: Any
|
||||
) -> None: ...
|
||||
|
||||
def database_backwards(
|
||||
self, app_label: Any, schema_editor: Any, from_state: Any, to_state: Any
|
||||
): ...
|
||||
|
||||
def references_field(
|
||||
self, model_name: str, name: str, app_label: Optional[str] = ...
|
||||
) -> bool: ...
|
||||
|
||||
def describe(self): ...
|
||||
|
||||
|
||||
class AlterOrderWithRespectTo(FieldRelatedOptionOperation):
|
||||
name: str
|
||||
order_with_respect_to: str = ...
|
||||
|
||||
def __init__(self, name: str, order_with_respect_to: str) -> None: ...
|
||||
|
||||
def deconstruct(self): ...
|
||||
|
||||
def state_forwards(self, app_label: Any, state: Any) -> None: ...
|
||||
|
||||
def database_forwards(
|
||||
self, app_label: Any, schema_editor: Any, from_state: Any, to_state: Any
|
||||
) -> None: ...
|
||||
|
||||
def database_backwards(
|
||||
self, app_label: Any, schema_editor: Any, from_state: Any, to_state: Any
|
||||
) -> None: ...
|
||||
|
||||
def references_field(
|
||||
self, model_name: str, name: str, app_label: None = ...
|
||||
) -> bool: ...
|
||||
|
||||
def describe(self): ...
|
||||
|
||||
|
||||
class AlterModelOptions(ModelOptionOperation):
|
||||
ALTER_OPTION_KEYS: Any = ...
|
||||
options: Any = ...
|
||||
|
||||
def __init__(self, name: str, options: Dict[str, str]) -> None: ...
|
||||
|
||||
def deconstruct(self): ...
|
||||
|
||||
def state_forwards(self, app_label: Any, state: Any) -> None: ...
|
||||
|
||||
def database_forwards(
|
||||
self, app_label: Any, schema_editor: Any, from_state: Any, to_state: Any
|
||||
) -> None: ...
|
||||
|
||||
def database_backwards(
|
||||
self, app_label: Any, schema_editor: Any, from_state: Any, to_state: Any
|
||||
) -> None: ...
|
||||
|
||||
def describe(self): ...
|
||||
|
||||
|
||||
class AlterModelManagers(ModelOptionOperation):
|
||||
serialization_expand_args: Any = ...
|
||||
managers: Any = ...
|
||||
|
||||
def __init__(self, name: Any, managers: Any) -> None: ...
|
||||
|
||||
def deconstruct(self): ...
|
||||
|
||||
def state_forwards(self, app_label: Any, state: Any) -> None: ...
|
||||
|
||||
def database_forwards(
|
||||
self, app_label: Any, schema_editor: Any, from_state: Any, to_state: Any
|
||||
) -> None: ...
|
||||
|
||||
def database_backwards(
|
||||
self, app_label: Any, schema_editor: Any, from_state: Any, to_state: Any
|
||||
) -> None: ...
|
||||
|
||||
def describe(self): ...
|
||||
|
||||
|
||||
class IndexOperation(Operation):
|
||||
option_name: str = ...
|
||||
|
||||
def model_name_lower(self): ...
|
||||
|
||||
|
||||
class AddIndex(IndexOperation):
|
||||
model_name: str = ...
|
||||
index: django.db.models.indexes.Index = ...
|
||||
|
||||
def __init__(self, model_name: str, index: Index) -> None: ...
|
||||
|
||||
def state_forwards(self, app_label: Any, state: Any) -> None: ...
|
||||
|
||||
def database_forwards(
|
||||
self, app_label: Any, schema_editor: Any, from_state: Any, to_state: Any
|
||||
) -> None: ...
|
||||
|
||||
def database_backwards(
|
||||
self, app_label: Any, schema_editor: Any, from_state: Any, to_state: Any
|
||||
) -> None: ...
|
||||
|
||||
def deconstruct(self): ...
|
||||
|
||||
def describe(self): ...
|
||||
|
||||
|
||||
class RemoveIndex(IndexOperation):
|
||||
model_name: str = ...
|
||||
name: str = ...
|
||||
|
||||
def __init__(self, model_name: str, name: str) -> None: ...
|
||||
|
||||
def state_forwards(self, app_label: Any, state: Any) -> None: ...
|
||||
|
||||
def database_forwards(
|
||||
self, app_label: Any, schema_editor: Any, from_state: Any, to_state: Any
|
||||
) -> None: ...
|
||||
|
||||
def database_backwards(
|
||||
self, app_label: Any, schema_editor: Any, from_state: Any, to_state: Any
|
||||
) -> None: ...
|
||||
|
||||
def deconstruct(self): ...
|
||||
|
||||
def describe(self): ...
|
||||
99
django-stubs-generated/db/migrations/operations/special.pyi
Normal file
99
django-stubs-generated/db/migrations/operations/special.pyi
Normal file
@@ -0,0 +1,99 @@
|
||||
from typing import Any, Callable, List, Optional
|
||||
|
||||
from django.db.backends.sqlite3.schema import DatabaseSchemaEditor
|
||||
from django.db.migrations.operations.models import CreateModel
|
||||
from django.db.migrations.state import ProjectState, StateApps
|
||||
|
||||
from .base import Operation
|
||||
|
||||
|
||||
class SeparateDatabaseAndState(Operation):
|
||||
serialization_expand_args: Any = ...
|
||||
database_operations: Any = ...
|
||||
state_operations: Any = ...
|
||||
def __init__(
|
||||
self,
|
||||
database_operations: List[Any] = ...,
|
||||
state_operations: List[CreateModel] = ...,
|
||||
) -> None: ...
|
||||
def deconstruct(self): ...
|
||||
def state_forwards(self, app_label: str, state: ProjectState) -> None: ...
|
||||
def database_forwards(
|
||||
self,
|
||||
app_label: str,
|
||||
schema_editor: DatabaseSchemaEditor,
|
||||
from_state: ProjectState,
|
||||
to_state: ProjectState,
|
||||
) -> None: ...
|
||||
def database_backwards(
|
||||
self,
|
||||
app_label: str,
|
||||
schema_editor: DatabaseSchemaEditor,
|
||||
from_state: ProjectState,
|
||||
to_state: ProjectState,
|
||||
) -> None: ...
|
||||
def describe(self): ...
|
||||
|
||||
class RunSQL(Operation):
|
||||
noop: str = ...
|
||||
sql: Any = ...
|
||||
reverse_sql: Any = ...
|
||||
state_operations: Any = ...
|
||||
hints: Any = ...
|
||||
elidable: Any = ...
|
||||
def __init__(
|
||||
self,
|
||||
sql: Any,
|
||||
reverse_sql: Optional[Any] = ...,
|
||||
state_operations: Optional[Any] = ...,
|
||||
hints: Optional[Any] = ...,
|
||||
elidable: bool = ...,
|
||||
) -> None: ...
|
||||
def deconstruct(self): ...
|
||||
@property
|
||||
def reversible(self): ...
|
||||
def state_forwards(self, app_label: Any, state: Any) -> None: ...
|
||||
def database_forwards(
|
||||
self, app_label: Any, schema_editor: Any, from_state: Any, to_state: Any
|
||||
) -> None: ...
|
||||
def database_backwards(
|
||||
self, app_label: Any, schema_editor: Any, from_state: Any, to_state: Any
|
||||
) -> None: ...
|
||||
def describe(self): ...
|
||||
|
||||
class RunPython(Operation):
|
||||
reduces_to_sql: bool = ...
|
||||
atomic: Any = ...
|
||||
code: Any = ...
|
||||
reverse_code: Any = ...
|
||||
hints: Any = ...
|
||||
elidable: Any = ...
|
||||
def __init__(
|
||||
self,
|
||||
code: Callable,
|
||||
reverse_code: Optional[Callable] = ...,
|
||||
atomic: Optional[bool] = ...,
|
||||
hints: None = ...,
|
||||
elidable: bool = ...,
|
||||
) -> None: ...
|
||||
def deconstruct(self): ...
|
||||
@property
|
||||
def reversible(self) -> bool: ...
|
||||
def state_forwards(self, app_label: str, state: ProjectState) -> None: ...
|
||||
def database_forwards(
|
||||
self,
|
||||
app_label: str,
|
||||
schema_editor: DatabaseSchemaEditor,
|
||||
from_state: ProjectState,
|
||||
to_state: ProjectState,
|
||||
) -> None: ...
|
||||
def database_backwards(
|
||||
self,
|
||||
app_label: str,
|
||||
schema_editor: DatabaseSchemaEditor,
|
||||
from_state: ProjectState,
|
||||
to_state: ProjectState,
|
||||
) -> None: ...
|
||||
def describe(self): ...
|
||||
@staticmethod
|
||||
def noop(apps: StateApps, schema_editor: DatabaseSchemaEditor) -> None: ...
|
||||
@@ -0,0 +1,9 @@
|
||||
from typing import Any, Optional
|
||||
|
||||
from django.db.migrations.state import ProjectState
|
||||
from django.db.models.fields import Field
|
||||
|
||||
|
||||
def is_referenced_by_foreign_key(
|
||||
state: ProjectState, model_name_lower: str, field: Field, field_name: str
|
||||
) -> bool: ...
|
||||
Reference in New Issue
Block a user