     
 
 # Apply the first migration from the remaining, and move on to the next
-applyMigration = (config, client, keyspace, file, version) ->
+applyMigration = (config, client, keyspace, file, version, interval) ->
   logInfo "Applying migration: #{file}"
 
   queryStrings = _.trim(FS.readFileSync(file, 'utf-8')).split('---')

      cassandraClient = client
      getSchemaVersion config, client, keyspace
      .then (schemaVersion) ->
        migrate config, client, keyspace, migrationFiles, schemaVersion
      .then (version) ->
        code = 0
      .catch (error) ->


    migrationFunctions = _(migrations)
    .map ([file, version]) ->
      -> applyMigration config, client, keyspace, file, version, interval
    .value()

    migrationFunctions.reduce(Q.when, Q(schemaVersion))
