diff --git a/manage.py b/manage.py index f1d7a6c..c573d0e 100755 --- a/manage.py +++ b/manage.py @@ -2,9 +2,13 @@ from flask_script import Manager, Shell, Command, Server from app import db, create_app +from flask_migrate import Migrate, MigrateCommand app = create_app() manager = Manager(app) +migrate = Migrate(app, db) +manager.add_command("db", MigrateCommand) + def main(): manager.add_command('shell', Shell(make_context=lambda:{"app":app, "db":db})) manager.add_command("runserver", Server()) diff --git a/requirements.txt b/requirements.txt index b67ebc0..4928d33 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,11 +1,14 @@ Click==7.0 Flask==1.0.2 +Flask-Migrate==2.5.3 Flask-SQLAlchemy==2.4.0 Flask-Script==2.0.6 Jinja2==2.10.1 +Mako==1.1.3 MarkupSafe==1.1.1 SQLAlchemy==1.3.3 Werkzeug==0.15.3 +alembic==1.4.3 certifi==2019.3.9 chardet==3.0.4 feedgen==0.9.0 @@ -14,6 +17,7 @@ idna==2.8 itsdangerous==1.1.0 lxml==4.2.1 python-dateutil==2.8.0 +python-editor==1.0.4 requests==2.21.0 six==1.12.0 urllib3==1.25.2