TableDiff extends TableDiff
Based on the doctrine/dbal implementation restoring direct property access and adding further helper methods.
not part of public core API.
Table of Contents
Properties
- $addedColumns : array<string|int, mixed>
- $addedForeignKeys : array<string|int, mixed>
- $addedIndexes : array<string|int, mixed>
- $changedColumns : array<string|int, mixed>
- $droppedColumns : array<string|int, mixed>
- $droppedForeignKeys : array<string|int, mixed>
- $droppedIndexes : array<string|int, mixed>
- $modifiedForeignKeys : array<string|int, mixed>
- $modifiedIndexes : array<string|int, mixed>
- $newName : string|null
- $newTableName is a TYPO3 internal addition to handle renames at a later point.
- $oldTable : Table
- $renamedIndexes : array<string|int, mixed>
- $tableOptions : array<string|int, mixed>
Methods
- __construct() : mixed
- Constructs a TableDiff object.
- ensure() : self
- getAddedColumns() : array<string, Column>
- getAddedForeignKeys() : array<string|int, ForeignKeyConstraint>
- getAddedIndexes() : array<string, Index>
- getChangedColumns() : array<string, ColumnDiff>
- getDroppedColumns() : array<string, Column>
- getDroppedForeignKeys() : array<string|int, ForeignKeyConstraint>
- getDroppedIndexes() : array<string, Index>
- getModifiedForeignKeys() : array<string|int, ForeignKeyConstraint>
- getModifiedIndexes() : array<string, Index>
- getNewName() : string|null
- getOldTable() : Table
- getRenamedIndexes() : array<string, Index>
- getTableOption() : string
- getTableOptions() : array<int|string, mixed>
- Getter for table options.
- hasTableOption() : bool
- Check if a table options has been set.
- isEmpty() : bool
- setTableOptions() : self
- Setter for table options
- unsetAddedIndex() : void
- unsetDroppedIndex() : void
Properties
$addedColumns
public
array<string|int, mixed>
$addedColumns
= []
$addedForeignKeys
public
array<string|int, mixed>
$addedForeignKeys
= []
$addedIndexes
public
array<string|int, mixed>
$addedIndexes
= []
$changedColumns
public
array<string|int, mixed>
$changedColumns
= []
$droppedColumns
public
array<string|int, mixed>
$droppedColumns
= []
$droppedForeignKeys
public
array<string|int, mixed>
$droppedForeignKeys
= []
$droppedIndexes
public
array<string|int, mixed>
$droppedIndexes
= []
$modifiedForeignKeys
public
array<string|int, mixed>
$modifiedForeignKeys
= []
$modifiedIndexes
public
array<string|int, mixed>
$modifiedIndexes
= []
$newName
$newTableName is a TYPO3 internal addition to handle renames at a later point.
public
string|null
$newName
= null
$oldTable
public
Table
$oldTable
$renamedIndexes
public
array<string|int, mixed>
$renamedIndexes
= []
$tableOptions
public
array<string|int, mixed>
$tableOptions
= []
Methods
__construct()
Constructs a TableDiff object.
public
__construct(Table $oldTable[, array<string, Column> $addedColumns = [] ][, array<string, ColumnDiff> $changedColumns = [] ][, array<string, Column> $droppedColumns = [] ][, array<string, Index> $addedIndexes = [] ][, array<string, Index> $modifiedIndexes = [] ][, array<string, Index> $droppedIndexes = [] ][, array<string, Index> $renamedIndexes = [] ][, array<string|int, ForeignKeyConstraint> $addedForeignKeys = [] ][, array<string|int, ForeignKeyConstraint> $modifiedForeignKeys = [] ][, array<string|int, ForeignKeyConstraint> $droppedForeignKeys = [] ][, array<int|string, mixed> $tableOptions = [] ]) : mixed
Parameters
- $oldTable : Table
- $addedColumns : array<string, Column> = []
- $changedColumns : array<string, ColumnDiff> = []
- $droppedColumns : array<string, Column> = []
- $addedIndexes : array<string, Index> = []
- $modifiedIndexes : array<string, Index> = []
- $droppedIndexes : array<string, Index> = []
- $renamedIndexes : array<string, Index> = []
- $addedForeignKeys : array<string|int, ForeignKeyConstraint> = []
- $modifiedForeignKeys : array<string|int, ForeignKeyConstraint> = []
- $droppedForeignKeys : array<string|int, ForeignKeyConstraint> = []
- $tableOptions : array<int|string, mixed> = []
The diff can be only instantiated by a Comparator.
Tags
ensure()
public
static ensure(TableDiff|TableDiff $tableDiff) : self
Parameters
- $tableDiff : TableDiff|TableDiff
Return values
selfgetAddedColumns()
public
getAddedColumns() : array<string, Column>
Return values
array<string, Column>getAddedForeignKeys()
public
getAddedForeignKeys() : array<string|int, ForeignKeyConstraint>
Return values
array<string|int, ForeignKeyConstraint>getAddedIndexes()
public
getAddedIndexes() : array<string, Index>
Return values
array<string, Index>getChangedColumns()
public
getChangedColumns() : array<string, ColumnDiff>
Return values
array<string, ColumnDiff>getDroppedColumns()
public
getDroppedColumns() : array<string, Column>
Return values
array<string, Column>getDroppedForeignKeys()
public
getDroppedForeignKeys() : array<string|int, ForeignKeyConstraint>
Return values
array<string|int, ForeignKeyConstraint>getDroppedIndexes()
public
getDroppedIndexes() : array<string, Index>
Return values
array<string, Index>getModifiedForeignKeys()
public
getModifiedForeignKeys() : array<string|int, ForeignKeyConstraint>
Return values
array<string|int, ForeignKeyConstraint>getModifiedIndexes()
public
getModifiedIndexes() : array<string, Index>
Return values
array<string, Index>getNewName()
public
getNewName() : string|null
Return values
string|nullgetOldTable()
public
getOldTable() : Table
Return values
TablegetRenamedIndexes()
public
getRenamedIndexes() : array<string, Index>
Return values
array<string, Index>getTableOption()
public
getTableOption(string $optionName) : string
Parameters
- $optionName : string
Return values
stringgetTableOptions()
Getter for table options.
public
getTableOptions() : array<int|string, mixed>
Return values
array<int|string, mixed>hasTableOption()
Check if a table options has been set.
public
hasTableOption(string $optionName) : bool
Parameters
- $optionName : string
Return values
boolisEmpty()
public
isEmpty() : bool
Return values
boolsetTableOptions()
Setter for table options
public
setTableOptions(array<int|string, mixed> $tableOptions) : self
Parameters
- $tableOptions : array<int|string, mixed>
Return values
selfunsetAddedIndex()
public
unsetAddedIndex(Index $index) : void
Parameters
- $index : Index
This method exists only for compatibility with the current implementation of schema managers that modify the diff while processing it.
unsetDroppedIndex()
public
unsetDroppedIndex(Index $index) : void
Parameters
- $index : Index
This method exists only for compatibility with the current implementation of schema managers that modify the diff while processing it.