public function actionNew(RequestApplicationInterface $app, $limit = 10)
    {
        if ($limit === 'all') {
            $limit = null;
        } else {
            $limit = (int)$limit;
            if ($limit < 1) {
                throw new Exception('The limit must be greater than 0.');
            }
        }

        return $this->getNewMigrations()->then(
            function($migrations) use ($limit) {
                if (empty($migrations)) {
                    $this->stdout("No new migrations found. Your system is up-to-date.\n", Console::FG_GREEN);
                } else {
                    $n = count($migrations);
                    if ($limit && $n > $limit) {
                        $migrations = array_slice($migrations, 0, $limit);
                        $this->stdout("Showing $limit out of $n new " . ($n === 1 ? 'migration' : 'migrations') . ":\n", Console::FG_YELLOW);
                    } else {
                        $this->stdout("Found $n new " . ($n === 1 ? 'migration' : 'migrations') . ":\n", Console::FG_YELLOW);
                    }

                    foreach ($migrations as $migration) {
                        $this->stdout("\t" . $migration . "\n");
                    }
                }
                return true;
            }
        );
    }
public function actionNew(RequestApplicationInterface $app, $limit = 10)
    {
        if ($limit === 'all') {
            $limit = null;
        } else {
            $limit = (int)$limit;
            if ($limit < 1) {
                throw new Exception('The limit must be greater than 0.');
            }
        }

        return $this->getNewMigrations()->then(
            function($migrations) use ($limit) {
                if (empty($migrations)) {
                    $this->stdout("No new migrations found. Your system is up-to-date.\n", Console::FG_GREEN);
                } else {
                    $n = count($migrations);
                    if ($limit && $n > $limit) {
                        $migrations = array_slice($migrations, 0, $limit);
                        $this->stdout("Showing $limit out of $n new " . ($n === 1 ? 'migration' : 'migrations') . ":\n", Console::FG_YELLOW);
                    } else {
                        $this->stdout("Found $n new " . ($n === 1 ? 'migration' : 'migrations') . ":\n", Console::FG_YELLOW);
                    }

                    foreach ($migrations as $migration) {
                        $this->stdout("\t" . $migration . "\n");
                    }
                }
                return true;
            }
        );
    }
public function actionNew ( RequestApplicationInterface $ app , $ limit = 10 ) { if ( $ limit === 'all' ) { $ limit = null ; } else { $ limit = ( int ) $ limit ; if ( $ limit < 1 ) { throw new Exception ( 'The limit must be greater than 0.' ) ; } } return $ this -> getNewMigrations ( ) -> then ( function ( $ migrations ) use ( $ limit ) { if ( empty ( $ migrations ) ) { $ this -> stdout ( "No new migrations found. Your system is up-to-date.\n" , Console :: FG_GREEN ) ; } else { $ n = count ( $ migrations ) ; if ( $ limit && $ n > $ limit ) { $ migrations = array_slice ( $ migrations , 0 , $ limit ) ; $ this -> stdout ( "Showing $limit out of $n new " . ( $ n === 1 ? 'migration' : 'migrations' ) . ":\n" , Console :: FG_YELLOW ) ; } else { $ this -> stdout ( "Found $n new " . ( $ n === 1 ? 'migration' : 'migrations' ) . ":\n" , Console :: FG_YELLOW ) ; } foreach ( $ migrations as $ migration ) { $ this -> stdout ( "\t" . $ migration . "\n" ) ; } } return true ; } ) ; }
Displays the un-applied new migrations.

This command will show the new migrations that have not been applied.
For example,

```
console migrate/new     # showing the first 10 new migrations
console migrate/new 5   # showing the first 5 new migrations
console migrate/new all # showing all new migrations
```

@param RequestApplicationInterface $app
@param int|string                  $limit the maximum number of new migrations to be displayed.
If it is `all`, all available new migrations will be displayed.
@return ExtendedPromiseInterface
@throws Exception if invalid limit value passed
Displays the un - applied new migrations .