migrations()->onRollbackStart = function (Migration $migration) { Out::print("Starting to roll back V{$migration->getVersion()} ".Out::BOLD_ATTRIBUTE."{$migration->getName()}".Out::RESET_ATTRIBUTES); echo " ".Out::ITALIC_ATTRIBUTE.$migration->getDescription().Out::RESET_ATTRIBUTES."\n\n"; }; // Rollback latest migration. $migration = Application::get()->migrations()->load()->rollbackLatest(); if (!empty($migration)) Out::success("Rolled back V{$migration->getVersion()} {$migration->getName()}"); else Out::warning("Nothing to rollback."); } }