$adapter
$adapter : \Phinx\Db\Adapter\AdapterInterface
Phinx Proxy Adapter.
Used for recording migration commands to automatically reverse them.
$adapter : \Phinx\Db\Adapter\AdapterInterface
__construct(\Phinx\Db\Adapter\AdapterInterface $adapter)
Class constructor, must always wrap another adapter.
\Phinx\Db\Adapter\AdapterInterface | $adapter |
setAdapter(\Phinx\Db\Adapter\AdapterInterface $adapter) : \Phinx\Db\Adapter\AdapterInterface
Sets the database adapter to proxy commands to.
\Phinx\Db\Adapter\AdapterInterface | $adapter |
getAdapter() : \Phinx\Db\Adapter\AdapterInterface
Gets the database adapter.
setOptions(array $options) : \Phinx\Db\Adapter\AdapterInterface
Set adapter configuration options.
array | $options |
setInput(\think\console\Input $input) : \Phinx\Db\Adapter\AdapterInterface
Sets the console input.
\think\console\Input | $input | Input |
getInput() : \think\console\Input
Gets the console input.
setOutput(\think\console\Output $output) : \Phinx\Db\Adapter\AdapterInterface
Sets the console output.
\think\console\Output | $output | Output |
getOutput() : \think\console\Output
Gets the console output.
insert(\Phinx\Db\Table $table, array $row) : void
Inserts data into a table.
\Phinx\Db\Table | $table | where to insert data |
array | $row |
migrated(\Phinx\Migration\MigrationInterface $migration, string $direction, integer $startTime, integer $endTime) : \Phinx\Db\Adapter\AdapterInterface
Records a migration being run.
\Phinx\Migration\MigrationInterface | $migration | Migration |
string | $direction | Direction |
integer | $startTime | Start Time |
integer | $endTime | End Time |
toggleBreakpoint(\Phinx\Migration\MigrationInterface $migration) : \Phinx\Db\Adapter\AdapterInterface
Toggle a migration breakpoint.
\Phinx\Migration\MigrationInterface | $migration |
isValidColumnType(\Phinx\Db\Table\Column $column) : boolean
Checks that the given column is of a supported type.
\Phinx\Db\Table\Column | $column |
createTable(\Phinx\Db\Table $table) : void
Creates the specified database table.
\Phinx\Db\Table | $table | Table |
getColumns(string $tableName) : array<mixed,\Phinx\Db\Table\Column>
Returns table columns
string | $tableName | Table Name |
addColumn(\Phinx\Db\Table $table, \Phinx\Db\Table\Column $column) : void
Adds the specified column to a database table.
\Phinx\Db\Table | $table | Table |
\Phinx\Db\Table\Column | $column | Column |
changeColumn(string $tableName, string $columnName, \Phinx\Db\Table\Column $newColumn) : \Phinx\Db\Table
Change a table column type.
string | $tableName | Table Name |
string | $columnName | Column Name |
\Phinx\Db\Table\Column | $newColumn | New Column |
addIndex(\Phinx\Db\Table $table, \Phinx\Db\Table\Index $index) : void
Adds the specified index to a database table.
\Phinx\Db\Table | $table | Table |
\Phinx\Db\Table\Index | $index | Index |
addForeignKey(\Phinx\Db\Table $table, \Phinx\Db\Table\ForeignKey $foreignKey) : void
Adds the specified foreign key to a database table.
\Phinx\Db\Table | $table | |
\Phinx\Db\Table\ForeignKey | $foreignKey |
setCommands(array $commands) : \Phinx\Db\Adapter\ProxyAdapter
Sets an array of recorded commands.
array | $commands | Commands |