public function migrate($direction = 'up')
    {
        if (!$this->tableExists('schema_migrations')) {
            $this->createMigrationsTable();
        }

        foreach (get_declared_classes() as $declaredClass) {
            if (is_subclass_of($declaredClass, "Avalon\\Database\\Migration")) {
                if ($direction === 'up') {
                    $this->up($declaredClass);
                } elseif ($direction === 'down') {
                    $this->down($declaredClass);
                }
            }
        }
    }