class Core\Migrations \ GeneratedAccountInstanceMigration


Allows account instance migrations to be generated at runtime. This means we don't need to create separate migrations for each new account type discovered, because each account type will have a constant table structure.


Method Summary

Name Description
__construct(AccountType $account)
apply(Connection $db) Apply only the current migration.
generateApiFields()
getName()
getTable()
isApplied(Connection $db) Override the default function to check that a table exists.

Inherited Method Summary

Name Description
getAllParents() Get all our parent Migrations along with all of its parents migrations into one unique array. (from Migration)
getParents() Get all parent Migrations that this migration depends on, as a list (from Migration)
hasPending(Connection $db) (from Migration)
install(Connection $db, Logger $log) Install the current migration and any parent migrations that this migration depends on. (from Migration)
tableExists(Connection $db, $table) Used e.g. in BaseMigration (from Migration)

public function __construct(AccountType $account)


public function apply(Connection $db)

Apply only the current migration.

Overrides:
apply(Connection $db)
Returns:
true on success or false on failure

public function generateApiFields()


public function getName()

Overrides:
getName()

public function getTable()


public function isApplied(Connection $db)

Override the default function to check that a table exists.

Overrides:
isApplied(Connection $db)
Returns:
true if this migration is applied