class MigrationModelRepository(abc.ABC):
__slots__: typing.Sequence[str] = ()
@abc.abstractmethod
def __len__(self) -> int:
...
@abc.abstractmethod
def __contains__(self, item: typing.Any, /) -> bool:
...
@abc.abstractmethod
def has_migration(self, item: typing.Any, /) -> bool:
...
@abc.abstractmethod
def has_migration_with_version(self, migration_version: int, /) -> bool:
...
@abc.abstractmethod
def has_migrations(self) -> bool:
...
@abc.abstractmethod
def acquire_migration_model_by_version(
self,
migration_version: int,
) -> typing.Optional[domain_migration.MigrationReadModel]:
...
@abc.abstractmethod
def acquire_migration_model_by_flag(
self, is_applied: bool
) -> typing.Optional[domain_migration.MigrationReadModel]:
...
@abc.abstractmethod
def acquire_all_migration_models(
self,
*,
ascending_id: bool = True,
) -> typing.Iterator[domain_migration.MigrationReadModel]:
...
@abc.abstractmethod
def acquire_migration_models_by_flag(
self, *, is_applied: bool
) -> typing.Iterator[domain_migration.MigrationReadModel]:
...
@abc.abstractmethod
def append_migration(self, migration: domain_migration.Migration, /) -> int:
...
@abc.abstractmethod
def remove_migration(self, migration_version: int, /) -> int:
...
@abc.abstractmethod
def set_applied_flag(self, migration: domain_migration.Migration, is_applied: bool) -> int:
...