/** * @throws \Exception * @return string */ protected function _getMigrationsDir() { $migrationsDir = Tools::getMigrationsPath(); if (!file_exists($migrationsDir)) { if (!@mkdir($migrationsDir)) { throw new \Exception("Unable to create migration directory on " . Tools::getMigrationsPath()); } @chmod($migrationsDir, 0777); } return $migrationsDir; }