public function __construct($id, Closure $apply, Closure $rollback = null, $hasInternalState = false) { $this->id = $id; $this->applyCallable = $apply; $this->rollbackCallable = $rollback; $this->hasInternalState = $hasInternalState; $this->log = Log::nil(); }
public function run(Log $log = null) { /** @var \Yaoi\Database\Definition\Table[] $tables */ $tables = array(Symbol::table(), Run::table(), RelatedStat::table(), SymbolStat::table(), Project::table(), Tag::table(), Aggregate::table(), ReportAggregate::table(), TagGroup::table()); if (null === $log) { $log = Log::nil(); } foreach ($tables as $table) { $table->migration()->setLog($log)->apply(); } }