ORIONIS API REFERENCE

THE ORIONIS API

Build with clarity.

Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.

class documentation

class Migration(ABC): (source)

View In Hierarchy

Abstract base class for all database migrations.

This class defines the contract that every migration must implement. A migration represents a reversible set of schema changes that can be applied to or reverted from the database.

Subclasses must implement the up and down methods to describe how the migration is applied and rolled back, respectively.

Notes

This class is intended to be executed by the migration manager rather than instantiated directly.

See Also

Migrator
Executes and manages migration lifecycle operations.
Async Method down Revert the migration.
Async Method up Apply the migration.
Class Variable __slots__ Undocumented
@abstractmethod
async def down(self): (source)

Revert the migration.

This method should undo the changes performed by up, restoring the database schema to its previous state whenever possible.

Returns
NoneThis method does not return a value.
Raises
ExceptionAny exception raised during execution should indicate that the migration rollback could not be completed successfully.
@abstractmethod
async def up(self): (source)

Apply the migration.

This method is responsible for performing the database schema changes associated with the migration, such as creating or modifying tables, indexes, constraints, or other database objects.

Returns
NoneThis method does not return a value.
Raises
ExceptionAny exception raised during execution should indicate that the migration could not be applied successfully.
__slots__: tuple = (source)

Undocumented