API Documentation (v0.9.0-alpha)

Avolutions\Database\Migrator

Handles migration of the database.

Methods

Method Visibility Description
__construct() public Creates new Migrator instance.
getExecutedMigrations() public Gets all executed migrations from the database and return the versions.
migrate() public Executes all migrations from the application database directory.

Method Details

__construct()

Creates new Migrator instance.

public __construct(Application $Application, Database $Database) : mixed
Parameters

Application $Application
Application instance.

Database $Database
Database instance.

getExecutedMigrations()

Gets all executed migrations from the database and return the versions.

public getExecutedMigrations() : array<string|int, mixed>
Return values
array<string|int, mixed> Gets all executed migrations from the database and return the versions.
migrate()

Executes all migrations from the application database directory.

public migrate() : mixed
Return values
mixed Executes all migrations from the application database directory.