src/Migrator.php
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);
                }
            }
        }
    }
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);
                }
            }
        }
    }
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 ) ; } } } }
Handles the execution of migrations.

@param string $direction
Handles the execution of migrations .