title: Flask-Migrate "No section: 'alembic'" on "db migrate" command
body: <p>I'm using Flask-Migrate, and I'm trying to add a column to my database by using the db migrate command. Here is the setup:</p>
  
  <pre><code>from flask import Flask, render_template, request, session, flash, redirect, url_for
  from flask.ext.babel import Babel
  from flask.ext.mail import Mail
  from flask.ext.script import Manager
  from flask.ext.migrate import Migrate, MigrateCommand
  from flask.ext.sqlalchemy import SQLAlchemy
  from flask.ext.security import Security, SQLAlchemyUserDatastore, \
       UserMixin, RoleMixin, login_required, roles_required
  from flask.ext.login import current_user
  from forms import UserEditForm
  import os, sys, datetime, random, math
  basedir = os.path.abspath(os.path.dirname(__file__))
  
  # Create app
  application = Flask(__name__)
  application.config['DEBUG'] = True
  application.config['SECRET_KEY'] = 'super-secret'
  application.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + os.path.join(basedir, 'app.db')
  
  application.config['DEFAULT_MAIL_SENDER'] = 'info@site.com'
  application.config['SECURITY_REGISTERABLE'] = True
  application.config['SECURITY_CONFIRMABLE'] = True
  application.config['SECURITY_RECOVERABLE'] = True
  
  application.config.from_object('config.email')
  
  application.config['DBPATH'] = os.path.join(basedir, 'app.db')
  
  # Setup mail extension
  mail = Mail(application)
  
  # Setup babel
  babel = Babel(application)
  
  @babel.localeselector
  def get_locale():
      override = request.args.get('lang')
  
      if override:
          session['lang'] = override
  
      rv = session.get('lang', 'en')
      return rv
  
  # Create database connection object
  
  db = SQLAlchemy(application)
  migrate = Migrate(application, db)
  
  manager = Manager(application)
  manager.add_command('db', MigrateCommand)
  
  # Define models
  roles_users = db.Table('roles_users',
          db.Column('user_id', db.Integer(), db.ForeignKey('user.id')),
          db.Column('role_id', db.Integer(), db.ForeignKey('role.id')))
  
  class Role(db.Model, RoleMixin):
      id = db.Column(db.Integer(), primary_key=True)
      name = db.Column(db.String(80), unique=True)
      description = db.Column(db.String(255))
  
  class User(db.Model, UserMixin):
      id = db.Column(db.Integer, primary_key=True)
      email = db.Column(db.String(255), unique=True)
      password = db.Column(db.String(255))
      active = db.Column(db.Boolean())
      confirmed_at = db.Column(db.DateTime())
      nickname = db.Column(db.String(255))
      favcolor = db.Column(db.String(255))
      favshape = db.Column(db.String(255))
      favflower = db.Column(db.String(255))
      favband = db.Column(db.String(255)) # &lt;&lt;&lt;--- NEW COLUMN
  
      roles = db.relationship('Role', secondary=roles_users,
                              backref=db.backref('users', lazy='dynamic'))
  
      def __str__(self):
          return '&lt;User id=%s email=%s&gt;' % (self.id, self.email)
  
  user_datastore = SQLAlchemyUserDatastore(db, User, Role)
  security = Security(application, user_datastore)
  
  # Views
  @app.route('/')
  def home():
      return render_template('index.html')
  
  
  if __name__ == '__main__':
      if str(sys.argv[1]) == 'run': 
          application.run(debug=True) #(host='0.0.0.0', debug=True)
      else:
          manager.run()
  </code></pre>
  
  <p>I am trying to add the new column <code>favband</code> using the following commands:</p>
  
  <p><code>flask\Scripts\python.exe application.py db migrate</code>
  <code>flask\Scripts\python.exe application.py db upgrade</code></p>
  
  <p>However, when trying <code>db migrate</code>, I get the following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "application.py", line 398, in &lt;module&gt;
      manager.run() #1) db migrate, 2) db upgrade
    File "C:\website\flask\lib\site-packages\flask_script\__init__.py", line 412, in run
      result = self.handle(sys.argv[0], sys.argv[1:])
    File "C:\website\flask\lib\site-packages\flask_script\__init__.py", line 383, in handle
      res = handle(*args, **config)
    File "C:\website\flask\lib\site-packages\flask_script\commands.py", line 216, in __call__
      return self.run(*args, **kwargs)
    File "C:\website\flask\lib\site-packages\flask_migrate\__init__.py", line 132, in migrate
      config = _get_config(directory)
    File "C:\website\flask\lib\site-packages\flask_migrate\__init__.py", line 46, in _get_config
      config.set_main_option('script_location', directory)
    File "C:\website\flask\lib\site-packages\alembic\config.py", line 198, in set_main_option
      self.file_config.set(self.config_ini_section, name, value)
    File "C:\Python27\Lib\ConfigParser.py", line 701, in set
      ConfigParser.set(self, section, option, value)
    File "C:\Python27\Lib\ConfigParser.py", line 388, in set
      raise NoSectionError(section)
  ConfigParser.NoSectionError: No section: 'alembic'
  </code></pre>
  
  <p>I have also tried this from within <code>flask\Scripts</code>, but get the same error:</p>
  
  <p><code>python.exe ../../application.py db migrate</code></p>
  
  <p>I have also tried upgrading flask-migrate to the latest version.</p>