Add flask_migrate

This commit is contained in:
root 2020-11-07 20:00:06 +00:00
parent 60da02d818
commit 75f5042eb7
2 changed files with 8 additions and 0 deletions

View file

@ -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())

View file

@ -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