docs: function initModels (config) {
      // iterate over models
      return Promise.each(_.values(config.models), model => {
          // if model does not have a mysql client then add from app config
          if (model.mysqlClient === null) {
              // get mysql client for model
              var mysql = config.mysql[model.name] || config.mysql.default
              // require database
              assert.ok(mysql, 'mysql client not found for model '+model.name)
              // set database for model
              model.mysql(mysql)
          }
          // if model does not have redis add
          if (!defined(model.cache)) {
              // get redis client for model
              var redis = config.redis[model.name] || config.redis.default
              // redis is optional
              if (defined(redis)) {
                  model.redis(redis)
              }
          }
          // sync model unless NO_SYNC env flag set
          if (!process.env.NO_SYNC) {
              return model.sync()
          }
      })
  }