protected function addMigrationHistory(string $version, ?string $namespace = null): void
    {
        $this->stdout(' > Adding migration history entry ...', Console::FG_YELLOW);

        $this->db->createCommand()->insert(
            $this->migrationTable,
            [
                'version' => ($namespace ? $namespace . '\\' : '') . $version,
                'apply_time' => time(),
            ]
        )->execute();

        $this->stdout("DONE.\n", Console::FG_GREEN);
    }
protected function addMigrationHistory(string $version, ?string $namespace = null): void
    {
        $this->stdout(' > Adding migration history entry ...', Console::FG_YELLOW);

        $this->db->createCommand()->insert(
            $this->migrationTable,
            [
                'version' => ($namespace ? $namespace . '\\' : '') . $version,
                'apply_time' => time(),
            ]
        )->execute();

        $this->stdout("DONE.\n", Console::FG_GREEN);
    }
protected function addMigrationHistory ( string $ version , ? string $ namespace = null ) : void { $ this -> stdout ( ' > Adding migration history entry ...' , Console :: FG_YELLOW ) ; $ this -> db -> createCommand ( ) -> insert ( $ this -> migrationTable , [ 'version' => ( $ namespace ? $ namespace . '\\' : '' ) . $ version , 'apply_time' => time ( ) , ] ) -> execute ( ) ; $ this -> stdout ( "DONE.\n" , Console :: FG_GREEN ) ; }
Adds migration history entry.
@param string $version
@param string|null $namespace
@throws DbException
@since 2.0
Adds migration history entry .