Skip to content

Commit

Permalink
add seed method
Browse files Browse the repository at this point in the history
  • Loading branch information
nojimage committed Nov 18, 2019
1 parent 38d739f commit 5fdadbf
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Model/Migration/MigrationGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,21 @@ public function rollback($id)
return $this->output->fetch();
}

/**
* シードを実行する
*
* @param string $seed seed name
* @return string
* @throws \Exception
*/
public function seed($seed = null)
{
$manager = $this->getManager();
$manager->seed($this->getConfig()->getDefaultEnvironment(), $seed);

return $this->output->fetch();
}

/**
* マイグレーションファイルの内容を取得する
*
Expand Down

0 comments on commit 5fdadbf

Please sign in to comment.