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
LoggerInterface $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 68
setContainer(Container $container)

Sets the container instance.

Parameters

Container $container Container

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

Resolves item from the container using overloading.

Parameters

string $key Key

Return Value

mixed

at line 56
__construct(ConnectionManager $connectionManager)

Constructor.

Parameters

ConnectionManager $connectionManager Connection manager instance

at line 66
string|null getConnectionName()

Returns the connection name.

Return Value

string|null

at line 76
Connection getConnection()

Returns the chosen connection.

Return Value

Connection

at line 86
bool useTransaction()

Should we execute this migration in a transaction?

Return Value

bool

at line 101
string getDescription()

Returns the migration description.

Return Value

string

at line 109
abstract up()

Makes changes to the database structure.

at line 114
abstract down()

Reverts the database changes.