public function actionList(): int
    {
        $tables = $this->db->schema->getTableNames();

        if (!$tables) {
            $this->stdout(" > Your database does not contain any tables yet.\n");
        } else {
            $this->stdout(' > Your database contains ' . count($tables) . " tables:\n");

            foreach ($tables as $table) {
                $this->stdout("   - $table\n");
            }
        }

        $this->stdout("\n > Run\n", Console::FG_GREEN);

        $tab = $this->ansiFormat('<table>', Console::FG_YELLOW);
        $cmd = $this->ansiFormat('migration/create', Console::FG_CYAN);
        $this->stdout("   $cmd $tab\n");

        $this->stdout("      to generate creating migration for the specific table.\n", Console::FG_GREEN);

        $cmd = $this->ansiFormat('migration/create-all', Console::FG_CYAN);
        $this->stdout("   $cmd\n");

        $this->stdout("      to generate creating migrations for all the tables.\n", Console::FG_GREEN);

        $cmd = $this->ansiFormat('migration/update', Console::FG_CYAN);
        $this->stdout("   $cmd $tab\n");

        $this->stdout("      to generate updating migration for the specific table.\n", Console::FG_GREEN);

        $cmd = $this->ansiFormat('migration/update-all', Console::FG_CYAN);
        $this->stdout("   $cmd\n");

        $this->stdout("      to generate updating migrations for all the tables.\n", Console::FG_GREEN);

        return ExitCode::OK;
    }
public function actionList(): int
    {
        $tables = $this->db->schema->getTableNames();

        if (!$tables) {
            $this->stdout(" > Your database does not contain any tables yet.\n");
        } else {
            $this->stdout(' > Your database contains ' . count($tables) . " tables:\n");

            foreach ($tables as $table) {
                $this->stdout("   - $table\n");
            }
        }

        $this->stdout("\n > Run\n", Console::FG_GREEN);

        $tab = $this->ansiFormat('<table>', Console::FG_YELLOW);
        $cmd = $this->ansiFormat('migration/create', Console::FG_CYAN);
        $this->stdout("   $cmd $tab\n");

        $this->stdout("      to generate creating migration for the specific table.\n", Console::FG_GREEN);

        $cmd = $this->ansiFormat('migration/create-all', Console::FG_CYAN);
        $this->stdout("   $cmd\n");

        $this->stdout("      to generate creating migrations for all the tables.\n", Console::FG_GREEN);

        $cmd = $this->ansiFormat('migration/update', Console::FG_CYAN);
        $this->stdout("   $cmd $tab\n");

        $this->stdout("      to generate updating migration for the specific table.\n", Console::FG_GREEN);

        $cmd = $this->ansiFormat('migration/update-all', Console::FG_CYAN);
        $this->stdout("   $cmd\n");

        $this->stdout("      to generate updating migrations for all the tables.\n", Console::FG_GREEN);

        return ExitCode::OK;
    }
public function actionList ( ) : int { $ tables = $ this -> db -> schema -> getTableNames ( ) ; if ( ! $ tables ) { $ this -> stdout ( " > Your database does not contain any tables yet.\n" ) ; } else { $ this -> stdout ( ' > Your database contains ' . count ( $ tables ) . " tables:\n" ) ; foreach ( $ tables as $ table ) { $ this -> stdout ( "   - $table\n" ) ; } } $ this -> stdout ( "\n > Run\n" , Console :: FG_GREEN ) ; $ tab = $ this -> ansiFormat ( '<table>' , Console :: FG_YELLOW ) ; $ cmd = $ this -> ansiFormat ( 'migration/create' , Console :: FG_CYAN ) ; $ this -> stdout ( "   $cmd $tab\n" ) ; $ this -> stdout ( "      to generate creating migration for the specific table.\n" , Console :: FG_GREEN ) ; $ cmd = $ this -> ansiFormat ( 'migration/create-all' , Console :: FG_CYAN ) ; $ this -> stdout ( "   $cmd\n" ) ; $ this -> stdout ( "      to generate creating migrations for all the tables.\n" , Console :: FG_GREEN ) ; $ cmd = $ this -> ansiFormat ( 'migration/update' , Console :: FG_CYAN ) ; $ this -> stdout ( "   $cmd $tab\n" ) ; $ this -> stdout ( "      to generate updating migration for the specific table.\n" , Console :: FG_GREEN ) ; $ cmd = $ this -> ansiFormat ( 'migration/update-all' , Console :: FG_CYAN ) ; $ this -> stdout ( "   $cmd\n" ) ; $ this -> stdout ( "      to generate updating migrations for all the tables.\n" , Console :: FG_GREEN ) ; return ExitCode :: OK ; }
Lists all tables in the database.
@return int
@since 2.1
Lists all tables in the database .