public function migrateDirectoryUp($dir, $flushDatabase = false): Awaitable
    {
        $config = new MigrationConfig();
        $config->loadMigrationsFromDirectory($dir);
        
        return $this->migrateUp($config, $flushDatabase);
    }
public function migrateDirectoryUp($dir, $flushDatabase = false): Awaitable
    {
        $config = new MigrationConfig();
        $config->loadMigrationsFromDirectory($dir);
        
        return $this->migrateUp($config, $flushDatabase);
    }
public function migrateDirectoryUp ( $ dir , $ flushDatabase = false ) : Awaitable { $ config = new MigrationConfig ( ) ; $ config -> loadMigrationsFromDirectory ( $ dir ) ; return $ this -> migrateUp ( $ config , $ flushDatabase ) ; }
Execute all up-migrations found in the given directory.

DB will be flushed if a migration must be applied, will simply flush all data if no migration is needed.

@param string $dir Directory where migration PHP-files are placed.
@param boolean $flushDatabase Flush database before any migration is applied?
Execute all up - migrations found in the given directory .