mediatekformation

AbstractMigration
in package

The AbstractMigration class is for end users to extend from when creating migrations. Extend this class and implement the required up() and down() methods.

Table of Contents

$connection  : Connection
$platform  : AbstractPlatform
$sm  : AbstractSchemaManager
$logger  : LoggerInterface
$plannedSql  : array<string|int, Query>
__construct()  : mixed
abortIf()  : void
down()  : void
getDescription()  : string
getSql()  : array<string|int, Query>
isTransactional()  : bool
Indicates the transactional mode of this migration.
postDown()  : void
postUp()  : void
preDown()  : void
preUp()  : void
skipIf()  : void
up()  : void
warnIf()  : void
addSql()  : void
throwIrreversibleMigrationException()  : void
write()  : void

Properties

Methods

abortIf()

public abortIf(bool $condition[, string $message = 'Unknown Reason' ]) : void
Parameters
$condition : bool
$message : string = 'Unknown Reason'
Tags
throws
AbortMigration
Return values
void

isTransactional()

Indicates the transactional mode of this migration.

public isTransactional() : bool

If this function returns true (default) the migration will be executed in one transaction, otherwise non-transactional state will be used to execute each of the migration SQLs.

Extending class should override this function to alter the return value.

Return values
bool

skipIf()

public skipIf(bool $condition[, string $message = 'Unknown Reason' ]) : void
Parameters
$condition : bool
$message : string = 'Unknown Reason'
Tags
throws
SkipMigration
Return values
void

warnIf()

public warnIf(bool $condition[, string $message = 'Unknown Reason' ]) : void
Parameters
$condition : bool
$message : string = 'Unknown Reason'
Return values
void

addSql()

protected addSql(string $sql[, array<string|int, mixed> $params = [] ][, array<string|int, mixed> $types = [] ]) : void
Parameters
$sql : string
$params : array<string|int, mixed> = []
$types : array<string|int, mixed> = []
Return values
void

throwIrreversibleMigrationException()

protected throwIrreversibleMigrationException([string|null $message = null ]) : void
Parameters
$message : string|null = null
Tags
throws
IrreversibleMigration
Return values
void

write()

protected write(string $message) : void
Parameters
$message : string
Return values
void

Search results