public function deleteModel($model)
    {
        // first remove any automatically created models
        /** @var $relationField ManyToManyField */
        foreach ($model->getMeta()->localManyToMany as $name => $relationField) {
            if ($relationField->relation->through->getMeta()->autoCreated) {
                $this->deleteModel($relationField->relation->through);
            }
        }
        $this->dropTable($model->getMeta()->getDbTable());
    }
public function deleteModel($model)
    {
        // first remove any automatically created models
        /** @var $relationField ManyToManyField */
        foreach ($model->getMeta()->localManyToMany as $name => $relationField) {
            if ($relationField->relation->through->getMeta()->autoCreated) {
                $this->deleteModel($relationField->relation->through);
            }
        }
        $this->dropTable($model->getMeta()->getDbTable());
    }
public function deleteModel ( $ model ) { // first remove any automatically created models /** @var $relationField ManyToManyField */ foreach ( $ model -> getMeta ( ) -> localManyToMany as $ name => $ relationField ) { if ( $ relationField -> relation -> through -> getMeta ( ) -> autoCreated ) { $ this -> deleteModel ( $ relationField -> relation -> through ) ; } } $ this -> dropTable ( $ model -> getMeta ( ) -> getDbTable ( ) ) ; }
Drop database represented by the model.

@param Model $model

@since  1.1.0

@author Eddilbert Macharia (http://eddmash.com) <edd.cowan@gmail.com>
Drop database represented by the model .