abstract class Migration

Base migration.

Traits

Container aware trait.

Properties

protected Container $container Container. from ContainerAwareTrait
protected array $resolved Array of resolved objects and/or references to resolved objects. from ContainerAwareTrait
Application $app from ContainerAwareTrait
CacheManager $cache from ContainerAwareTrait
Input $input from ContainerAwareTrait
Output $output from ContainerAwareTrait
CommandBusInterface $bus from ContainerAwareTrait
Config $config from ContainerAwareTrait
protected ConnectionManager $database Connection manager instance.
ErrorHandler $errorHandler from ContainerAwareTrait
Event $event from ContainerAwareTrait
FileSystem $fileSystem from ContainerAwareTrait
AuthorizerInterface $authorizer from ContainerAwareTrait
Gatekeeper $gatekeeper from ContainerAwareTrait
Request $request from ContainerAwareTrait
Response $response from ContainerAwareTrait
Routes $routes from ContainerAwareTrait
URLBuilder $urlBuilder from ContainerAwareTrait
I18n $i18n from ContainerAwareTrait
PaginationFactoryInterface $pagination from ContainerAwareTrait
ConnectionManager $redis from ContainerAwareTrait
CryptoManager $crypto from ContainerAwareTrait
Signer $signer from ContainerAwareTrait
Session $session from ContainerAwareTrait
Humanizer $humanizer from ContainerAwareTrait
ValidatorFactory $validator from ContainerAwareTrait
ViewFactory $view from ContainerAwareTrait
Logger $logger from ContainerAwareTrait
protected bool $useTransaction Should a transaction be used if possible?
protected string|null $connectionName Connection name.
protected string|null $description Migration description.

Methods

setContainer(Container $container)

Sets the container instance.

mixed
__get(string $key)

Resolves item from the container using overloading.

__construct(ConnectionManager $connectionManager)

Constructor.

string|null
getConnectionName()

Returns the connection name.

getConnection()

Returns the chosen connection.

bool
useTransaction()

Should we execute this migration in a transaction?

string
getDescription()

Returns the migration description.

up()

Makes changes to the database structure.

down()

Reverts the database changes.

Details

in ContainerAwareTrait at line 66
setContainer(Container $container)

Sets the container instance.

Parameters

Container $container Container

in ContainerAwareTrait at line 77
mixed __get(string $key)

Resolves item from the container using overloading.

Parameters

string $key Key

Return Value

mixed

at line 54
__construct(ConnectionManager $connectionManager)

Constructor.

Parameters

ConnectionManager $connectionManager Connection manager instance

at line 64
string|null getConnectionName()

Returns the connection name.

Return Value

string|null

at line 74
Connection getConnection()

Returns the chosen connection.

Return Value

Connection

at line 84
bool useTransaction()

Should we execute this migration in a transaction?

Return Value

bool

at line 99
string getDescription()

Returns the migration description.

Return Value

string

at line 107
abstract up()

Makes changes to the database structure.

at line 112
abstract down()

Reverts the database changes.