src/bundles/Database/Migrator.php
public static function migrate( $silent = false )
	{
		$migrations = $silent ? static::available() : static::unstaged();
		
		foreach( $migrations as $key => $value )
		{
			if ( empty( $value ) )
			{
				continue;
			}
			
			if ( \ClanCats::is_cli() )
			{
				\CCCli::info( 'found new "'.$key.'" migrations.' );
			}
			
			foreach( $value as $time => $path )
			{
				$migration = new static( $path );
				
				// run the migration
				$migration->up();
				
				if ( \ClanCats::is_cli() )
				{
					\CCCli::success( 'migrated '.$migration->name() );
				}
			}
			
			static::$config->set( $key.'.revision', $time );
		}
		
		if ( !$silent )
		{
			static::$config->write();
		}
	}
public static function migrate( $silent = false )
	{
		$migrations = $silent ? static::available() : static::unstaged();
		
		foreach( $migrations as $key => $value )
		{
			if ( empty( $value ) )
			{
				continue;
			}
			
			if ( \ClanCats::is_cli() )
			{
				\CCCli::info( 'found new "'.$key.'" migrations.' );
			}
			
			foreach( $value as $time => $path )
			{
				$migration = new static( $path );
				
				// run the migration
				$migration->up();
				
				if ( \ClanCats::is_cli() )
				{
					\CCCli::success( 'migrated '.$migration->name() );
				}
			}
			
			static::$config->set( $key.'.revision', $time );
		}
		
		if ( !$silent )
		{
			static::$config->write();
		}
	}
public static function migrate ( $ silent = false ) { $ migrations = $ silent ? static :: available ( ) : static :: unstaged ( ) ; foreach ( $ migrations as $ key => $ value ) { if ( empty ( $ value ) ) { continue ; } if ( \ ClanCats :: is_cli ( ) ) { \ CCCli :: info ( 'found new "' . $ key . '" migrations.' ) ; } foreach ( $ value as $ time => $ path ) { $ migration = new static ( $ path ) ; // run the migration $ migration -> up ( ) ; if ( \ ClanCats :: is_cli ( ) ) { \ CCCli :: success ( 'migrated ' . $ migration -> name ( ) ) ; } } static :: $ config -> set ( $ key . '.revision' , $ time ) ; } if ( ! $ silent ) { static :: $ config -> write ( ) ; } }
Run all new migration

@param bool			$silent 		In the silent mode the migrator ignores the migration file

@return void
Run all new migration