code: protected function createMigration($class)
      {
          $this->includeMigrationFile($class);
  
          /** @var MigrationInterface $migration */
          $migration = Yii::createObject($class);
          if ($migration instanceof BaseObject && $migration->canSetProperty('compact')) {
              $migration->compact = $this->compact;
          }
  
          return $migration;
      }
docs: Creates a new migration instance.
  @param string $class the migration class name
  @return \yii\db\MigrationInterface the migration instance