index.js
function(callback) {
    var cqlString = 'SELECT * from migrations';
    return this.runSql(cqlString)
      .then(function(data) {
        var sortedData = data.rows.map(function(item) {
          item.moment_time = moment(item.ran_on).valueOf();
          return item
        });
        // Order migration records in ascending order.
        return sortedData.sort(function(x,y) {
          if (x.moment_time > y.moment_time) return -1;
          if (x.moment_time < y.moment_time) return 1;
          return 0;
        })
      })
      .nodeify(callback);
  }
function(callback) {
    var cqlString = 'SELECT * from migrations';
    return this.runSql(cqlString)
      .then(function(data) {
        var sortedData = data.rows.map(function(item) {
          item.moment_time = moment(item.ran_on).valueOf();
          return item
        });
        // Order migration records in ascending order.
        return sortedData.sort(function(x,y) {
          if (x.moment_time > y.moment_time) return -1;
          if (x.moment_time < y.moment_time) return 1;
          return 0;
        })
      })
      .nodeify(callback);
  }
function ( callback ) { var cqlString = 'SELECT * from migrations' ; return this . runSql ( cqlString ) . then ( function ( data ) { var sortedData = data . rows . map ( function ( item ) { item . moment_time = moment ( item . ran_on ) . valueOf ( ) ; return item } ) ; // Order migration records in ascending order. return sortedData . sort ( function ( x , y ) { if ( x . moment_time > y . moment_time ) return - 1 ; if ( x . moment_time < y . moment_time ) return 1 ; return 0 ; } ) } ) . nodeify ( callback ) ; }
List all existing migrations
@param callback
List all existing migrations