$options
$options : array
Phinx SQLite Adapter.
$input : \think\console\Input
$output : \think\console\Output
__construct(array $options, \think\console\Input $input = null, \think\console\Output $output = null)
Class Constructor.
array | $options | Options |
\think\console\Input | $input | Input Interface |
\think\console\Output | $output | Output Interface |
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.
setSchemaTableName(string $schemaTableName) : \Phinx\Db\Adapter\PdoAdapter
Sets the schema table name.
string | $schemaTableName | Schema Table Name |
setConnection(\PDO $connection) : \Phinx\Db\Adapter\AdapterInterface
Sets the database connection.
\PDO | $connection | Connection |
setCommandStartTime(integer $time) : \Phinx\Db\Adapter\AdapterInterface
Sets the command start time
integer | $time |
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 |
getColumnSqlDefinition(\Phinx\Db\Table\Column $column) : string
Gets the SQLite Column Definition for a Column object.
\Phinx\Db\Table\Column | $column | Column |
getCommentDefinition(\Phinx\Db\Table\Column $column) : string
Gets the comment Definition for a Column object.
\Phinx\Db\Table\Column | $column | Column |
getIndexSqlDefinition(\Phinx\Db\Table $table, \Phinx\Db\Table\Index $index) : string
Gets the SQLite Index Definition for an Index object.
\Phinx\Db\Table | $table | |
\Phinx\Db\Table\Index | $index | Index |
getForeignKeySqlDefinition(\Phinx\Db\Table\ForeignKey $foreignKey) : string
Gets the SQLite Foreign Key Definition for an ForeignKey object.
\Phinx\Db\Table\ForeignKey | $foreignKey |