yii\db\Migration::dropCommentFromTable PHP Method

dropCommentFromTable() public method

Builds a SQL statement for dropping comment from table
Since: 2.0.8
public dropCommentFromTable ( string $table )
$table string the table whose column is to be commented. The table name will be properly quoted by the method.
    public function dropCommentFromTable($table)
    {
        echo "    > drop comment from table {$table} ...";
        $time = microtime(true);
        $this->db->createCommand()->dropCommentFromTable($table)->execute();
        echo ' done (time: ' . sprintf('%.3f', microtime(true) - $time) . "s)\n";
    }

Usage Example

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