yii\db\Migration::dropCommentFromColumn PHP Method

dropCommentFromColumn() public method

Builds and execute a SQL statement for dropping comment from column
Since: 2.0.8
public dropCommentFromColumn ( string $table, string $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.
    public function dropCommentFromColumn($table, $column)
    {
        echo "    > drop comment from column {$column} ...";
        $time = microtime(true);
        $this->db->createCommand()->dropCommentFromColumn($table, $column)->execute();
        echo ' done (time: ' . sprintf('%.3f', microtime(true) - $time) . "s)\n";
    }

Usage Example

Exemplo n.º 1
0
 /**
  * @inheritdoc
  * Note: table will be auto pefixied if [[$autoWrapTableNames]] is true.
  * @since 0.3.0
  */
 public function dropCommentFromColumn($table, $column)
 {
     $table = $this->autoWrappedTableName($table);
     return parent::dropCommentFromColumn($table, $column);
 }