yii\mongodb\Migration::dropCollection PHP Method

dropCollection() public method

Drops existing collection.
public dropCollection ( string | array $collection )
$collection string | array name of the collection
    public function dropCollection($collection)
    {
        $this->beginProfile($token = "    > drop collection " . $this->composeCollectionLogName($collection) . " ...");
        $this->db->getCollection($collection)->drop();
        $this->endProfile($token);
    }