code: def upgrade(directory=None, revision='head', sql=False, tag=None, x_arg=None):
      
      config = current_app.extensions['migrate'].migrate.get_config(directory,
                                                                    x_arg=x_arg)
      command.upgrade(config, revision, sql=sql, tag=tag)
docs: Upgrade to a later version