async runMigrations(migrations = []) {
    const { commonClient } = this;
    const appliedMigrations = [];
    try {
      for (const migration of migrations) {
        this.emit("migration-started", migration);
        const sql = await migration.getSql();
        await commonClient.runQuery(sql);
        await commonClient.runQuery(commonClient.persistActionSql(migration));
        appliedMigrations.push(migration);
        this.emit("migration-finished", migration);
      }
    } catch (error) {
      error.appliedMigrations = appliedMigrations;
      throw error;
    }
    return appliedMigrations;
  }
/**
   * Runs the migrations in the order to reach target version
   *
   * @returns {Promise} - Array of migration objects to appled to database
   * @param {Array} migrations - Array of migration objects to apply to database
   */
Runs the migrations in the order to reach target version
@returns {Promise} - Array of migration objects to appled to database
@param {Array} migrations - Array of migration objects to apply to database
Runs the migrations in the order to reach target version @returns { Promise } - Array of migration objects to appled to database @param { Array } migrations - Array of migration objects to apply to database
async runMigrations(migrations = []) {
    const { commonClient } = this;
    const appliedMigrations = [];
    try {
      for (const migration of migrations) {
        this.emit("migration-started", migration);
        const sql = await migration.getSql();
        await commonClient.runQuery(sql);
        await commonClient.runQuery(commonClient.persistActionSql(migration));
        appliedMigrations.push(migration);
        this.emit("migration-finished", migration);
      }
    } catch (error) {
      error.appliedMigrations = appliedMigrations;
      throw error;
    }
    return appliedMigrations;
  }
async runMigrations ( migrations = [ ] ) { const { commonClient } = this ; const appliedMigrations = [ ] ; try { for ( const migration of migrations ) { this . emit ( "migration-started" , migration ) ; const sql = await migration . getSql ( ) ; await commonClient . runQuery ( sql ) ; await commonClient . runQuery ( commonClient . persistActionSql ( migration ) ) ; appliedMigrations . push ( migration ) ; this . emit ( "migration-finished" , migration ) ; } } catch ( error ) { error . appliedMigrations = appliedMigrations ; throw error ; } return appliedMigrations ; }
Runs the migrations in the order to reach target version
 @returns {Promise} - Array of migration objects to appled to database
 @param {Array} migrations - Array of migration objects to apply to database
Runs the migrations in the order to reach target version @returns { Promise } - Array of migration objects to appled to database @param { Array } migrations - Array of migration objects to apply to database