     migration = require task.path
     throw new Error('INVALID MIGRATION: ' + task.name) unless typeof migration.up is 'function'
 
-    if schema[task.name]
+    if schemas[task.name]
       _info 'skip', task.name
       return num
 

###
_error = (action, msg = '') -> console.error "  #{action}".red, "#{msg}".grey

_loadSchema = ->
  try
    schema = require path.resolve(config.schema)
  catch e
    schema = {}
  schema

_loadTasks = (direction = 'up') ->
  fs.readdirAsync config.dir



{ext, dir} = config

# Load schemas and private configurations
try
  schema = require path.resolve(config.schema)
catch e
  schema = {}

schema.schemas or= {}
schema.config or= {}
config = util._extend config, schema.config
{schemas} = schema

###*
 * Migrate template in Coffeescript/Javascript format
 * @type {String}
