class Version20170118000000 extends AbstractMigration implements RepeatableMigrationInterface (View source)

Properties

protected $app from AbstractMigration
protected $validAttributes from AbstractMigration

Methods

__construct(Version $version)

No description

upgradeSchema(Schema $schema)

Override this method when the database structure is upgraded using ONLY the DBAL Schema object.

upgradeDatabase()

Override this method when database schema is not upgraded, or when it's upgraded without using a Schema.

downgradeSchema(Schema $schema)

Override this method when the database structure is downgraded using ONLY the DBAL Schema object.

downgradeDatabase()

Override this method when database schema is not downgraded, or when it's downgraded without using a Schema.

up(Schema $schema)

{@inheritdoc}

postUp(Schema $schema)

{@inheritdoc}

down(Schema $schema)

{@inheritdoc}

postDown(Schema $schema)

{@inheritdoc}

output($message)

No description

refreshEntities($entities = null)

No description

refreshDatabaseTables($tables)

No description

refreshBlockType($btHandle)

No description

nullifyInvalidForeignKey(string $table, string $field, string $linkedTable, string $linkedField)

Set to NULL the fields in a table that reference not existing values of another table.

deleteInvalidForeignKey(string $table, string $field, string $linkedTable, string $linkedField)

Delete the records in a table whose field references not existing values of another table.

isAttributeHandleValid($categoryClass, $handle)

No description

createSinglePage(string $path, string $name = '', array $attributes = [])

Create a new SinglePage (if it does not exist).

Details

__construct(Version $version)

Parameters

Version $version

upgradeSchema(Schema $schema)

Override this method when the database structure is upgraded using ONLY the DBAL Schema object.

Parameters

Schema $schema

upgradeDatabase()

Override this method when database schema is not upgraded, or when it's upgraded without using a Schema.

See also

\Concrete\Core\Updater\Migrations\AbstractMigration::upgradeDatabase()

downgradeSchema(Schema $schema)

Override this method when the database structure is downgraded using ONLY the DBAL Schema object.

Parameters

Schema $schema

downgradeDatabase()

Override this method when database schema is not downgraded, or when it's downgraded without using a Schema.

final up(Schema $schema)

{@inheritdoc}

Parameters

Schema $schema

See also

\Doctrine\DBAL\Migrations\AbstractMigration::up()

final postUp(Schema $schema)

{@inheritdoc}

Parameters

Schema $schema

See also

\Doctrine\DBAL\Migrations\AbstractMigration::postUp()

final down(Schema $schema)

{@inheritdoc}

Parameters

Schema $schema

See also

\Doctrine\DBAL\Migrations\AbstractMigration::down()

final postDown(Schema $schema)

{@inheritdoc}

Parameters

Schema $schema

See also

\Doctrine\DBAL\Migrations\AbstractMigration::postDown()

protected output($message)

Parameters

$message

protected refreshEntities($entities = null)

Parameters

$entities

protected refreshDatabaseTables($tables)

Parameters

$tables

protected refreshBlockType($btHandle)

Parameters

$btHandle

protected nullifyInvalidForeignKey(string $table, string $field, string $linkedTable, string $linkedField)

Set to NULL the fields in a table that reference not existing values of another table.

Parameters

string $table The table containing the problematic field
string $field The problematic field
string $linkedTable The referenced table
string $linkedField The referenced field

protected deleteInvalidForeignKey(string $table, string $field, string $linkedTable, string $linkedField)

Delete the records in a table whose field references not existing values of another table.

Parameters

string $table The table containing the problematic field
string $field The problematic field
string $linkedTable The referenced table
string $linkedField The referenced field

protected isAttributeHandleValid($categoryClass, $handle)

Parameters

$categoryClass
$handle

protected Page createSinglePage(string $path, string $name = '', array $attributes = [])

Create a new SinglePage (if it does not exist).

Parameters

string $path the single page path
string $name the single page name
array $attributes the attribute values (keys are the attribute handles, values are the attribute values)

Return Value

Page

protected addVersionIdToPageTypeOutputBlocks()