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
Input $input from ContainerAwareTrait
Output $output from ContainerAwareTrait
CommandBusInterface $bus from ContainerAwareTrait
FileSystem $fileSystem from ContainerAwareTrait
Config $config from ContainerAwareTrait
CacheManager $cache from ContainerAwareTrait
CryptoManager $crypto from ContainerAwareTrait
protected ConnectionManager $database Connection manager instance.
Event $event from ContainerAwareTrait
ErrorHandler $errorHandler from ContainerAwareTrait
Authentication $gatekeeper from ContainerAwareTrait
Humanizer $humanizer from ContainerAwareTrait
I18n $i18n from ContainerAwareTrait
LoggerInterface $logger from ContainerAwareTrait
PaginationFactoryInterface $pagination from ContainerAwareTrait
ConnectionManager $redis from ContainerAwareTrait
Request $request from ContainerAwareTrait
Response $response from ContainerAwareTrait
Routes $routes from ContainerAwareTrait
Session $session from ContainerAwareTrait
Signer $signer from ContainerAwareTrait
URLBuilder $urlBuilder from ContainerAwareTrait
ValidatorFactory $validator from ContainerAwareTrait
ViewFactory $view from ContainerAwareTrait
protected bool $useTransaction Should a transaction be used if possible?
protected null|string $connectionName Connection name.
protected null|string $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.

null|string
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 67
setContainer(Container $container)

Sets the container instance.

Parameters

Container $container Container

in ContainerAwareTrait at line 78
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
null|string getConnectionName()

Returns the connection name.

Return Value

null|string

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.