public static function migrateDown(Event $event)
    {
        $dir = self::getRootDir().'cache/dev/DoctrineMigrations/';
        if (self::isHaveMigrations($dir)) {
            file_put_contents(
                $dir.'migrations.yml',
                "migrations_namespace: 'Application\Migrations'\n".
                "migrations_directory: 'app/cache/dev/DoctrineMigrations/'\n".
                "table_name: 'migration_versions'"
            );

            self::executeCommand(
                'doctrine:migrations:migrate --no-interaction --configuration='.$dir.'migrations.yml 0',
                $event->getIO()
            );
        }
    }