From e1f1af2cb02e725b715edf56fac7ed6f907b2441 Mon Sep 17 00:00:00 2001 From: lord63 Date: Sat, 23 Jan 2016 09:55:04 +0800 Subject: [PATCH] Init the flask-migrate extension first --- {{cookiecutter.app_name}}/manage.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.app_name}}/manage.py b/{{cookiecutter.app_name}}/manage.py index 6a461ef..fce0e49 100755 --- a/{{cookiecutter.app_name}}/manage.py +++ b/{{cookiecutter.app_name}}/manage.py @@ -5,7 +5,7 @@ import os from glob import glob from subprocess import call -from flask_migrate import MigrateCommand +from flask_migrate import Migrate, MigrateCommand from flask_script import Command, Manager, Option, Server, Shell from flask_script.commands import Clean, ShowUrls @@ -20,6 +20,7 @@ TEST_PATH = os.path.join(HERE, 'tests') app = create_app(CONFIG) manager = Manager(app) +migrate = Migrate(app, db) def _make_context():