db\Command dropIndex()

dropIndex() public method Creates a SQL command for dropping an index. public $this dropIndex ( $name, $table )$name string The name of the index to be dropped. The name will be properly quoted by the method. $table string The table whose index is to be dropped. The name will be properly quoted by the method. return $this The command object itself

db\Command dropPrimaryKey()

dropPrimaryKey() public method Creates a SQL command for removing a primary key constraint to an existing table. public $this dropPrimaryKey ( $name, $table )$name string The name of the primary key constraint to be removed. $table string The table that the primary key constraint will be removed from. return $this The command object itself

db\Command dropCommentFromColumn()

dropCommentFromColumn() public method (available since version 2.0.8) Builds a SQL command for dropping comment from column public $this dropCommentFromColumn ( $table, $column )$table string The table whose column is to be commented. The table name will be properly quoted by the method. $column string The name of the column to be commented. The column name will be properly quoted by the method. return $this The command object itself

db\Command dropCommentFromTable()

dropCommentFromTable() public method (available since version 2.0.8) Builds a SQL command for dropping comment from table public $this dropCommentFromTable ( $table )$table string The table whose column is to be commented. The table name will be properly quoted by the method. return $this The command object itself

db\Command dropForeignKey()

dropForeignKey() public method Creates a SQL command for dropping a foreign key constraint. public $this dropForeignKey ( $name, $table )$name string The name of the foreign key constraint to be dropped. The name will be properly quoted by the method. $table string The table whose foreign is to be dropped. The name will be properly quoted by the method. return $this The command object itself

db\Command delete()

delete() public method Creates a DELETE command. For example, $connection->createCommand()->delete('user', 'status = 0')->execute(); The method will properly escape the table and column names. Note that the created command is not executed until execute() is called. public $this delete ( $table, $condition = '', $params = [] )$table string The table where the data will be deleted from. $condition string|array The condition that will be put in the WHERE part. Please refer to

db\Command dropColumn()

dropColumn() public method Creates a SQL command for dropping a DB column. public $this dropColumn ( $table, $column )$table string The table whose column is to be dropped. The name will be properly quoted by the method. $column string The name of the column to be dropped. The name will be properly quoted by the method. return $this The command object itself

db\Command createTable()

createTable() public method Creates a SQL command for creating a new DB table. The columns in the new table should be specified as name-definition pairs (e.g. 'name' => 'string'), where name stands for a column name which will be properly quoted by the method, and definition stands for the column type which can contain an abstract DB type. The method yii\db\QueryBuilder::getColumnType() will be called to convert the abstract column types to physical ones. For example, string will be conv

db\Command createIndex()

createIndex() public method Creates a SQL command for creating a new index. public $this createIndex ( $name, $table, $columns, $unique = false )$name string The name of the index. The name will be properly quoted by the method. $table string The table that the new index will be created for. The table name will be properly quoted by the method. $columns string|array The column(s) that should be included in the index. If there are multiple columns, please separate them by commas. Th

db\Command checkIntegrity()

checkIntegrity() public method Builds a SQL command for enabling or disabling integrity check. public $this checkIntegrity ( $check = true, $schema = '', $table = '' )$check boolean Whether to turn on or off the integrity check. $schema string The schema name of the tables. Defaults to empty string, meaning the current or default schema. $table string The table name. return $this The command object itself throws yii\base\NotSupportedException if this is not supported by the under