class ForeignKeyFixer (View source)

Properties

private Connection $connection
private AbstractSchemaManager $schemaManager
private Closure|null $tick

Methods

__construct(Connection $connection)

No description

$this
setTick(Closure $value = null)

Set a callback to be called to log/display progress.

fixForeignKeys(array $tableNames = null, ArrayAccess $errors = null)

Fix the foreign key definitions.

fixForeignKeysInTable(string $tableName, array $actualTableNames, ArrayAccess $errors)

No description

fixForeignKey(ForeignKeyConstraint $foreignKey, array $actualTableNames, ArrayAccess $errors)

No description

tick(string|Exception|Throwable $what)

No description

Details

__construct(Connection $connection)

No description

Parameters

Connection $connection

$this setTick(Closure $value = null)

Set a callback to be called to log/display progress.

Parameters

Closure $value

Return Value

$this

fixForeignKeys(array $tableNames = null, ArrayAccess $errors = null)

Fix the foreign key definitions.

Parameters

array $tableNames

the names of the database tables to be fixed (NULL means all tables)

ArrayAccess $errors

errors occurred during the execution will be added here

private fixForeignKeysInTable(string $tableName, array $actualTableNames, ArrayAccess $errors)

No description

Parameters

string $tableName
array $actualTableNames
ArrayAccess $errors

private fixForeignKey(ForeignKeyConstraint $foreignKey, array $actualTableNames, ArrayAccess $errors)

No description

Parameters

ForeignKeyConstraint $foreignKey
array $actualTableNames
ArrayAccess $errors

private tick(string|Exception|Throwable $what)

No description

Parameters

string|Exception|Throwable $what