- 安装依赖
(C:\ProgramData\Anaconda3) C:\Users\ychen>pip install flask-migrate
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting flask-migrate
Downloading https://mirrors.aliyun.com/pypi/packages/93/01/587023575286236f95d2ab8a826c320375ed5ea2102bb103ed89704ffa6b/Flask_Migrate-4.0.7-py3-none-any.whl (21 kB)
Requirement already satisfied: Flask>=0.9 in c:\programdata\anaconda3\lib\site-packages (from flask-migrate) (2.0.1)
Requirement already satisfied: Flask-SQLAlchemy>=1.0 in c:\programdata\anaconda3\lib\site-packages (from flask-migrate) (2.5.1)
Downloading https://mirrors.aliyun.com/pypi/packages/7e/dc/0099c61985b6cb92688c8b9c9c6943d22b80957751d43c51def582afc546/Flask_Migrate-4.0.6-py3-none-any.whl (21 kB)
Downloading https://mirrors.aliyun.com/pypi/packages/0e/3a/3e7a97fff0396e5206af5fdcbf66fdbb499b1daa049fbe074566fd73c664/Flask_Migrate-4.0.5-py3-none-any.whl (21 kB)
Downloading https://mirrors.aliyun.com/pypi/packages/e4/65/9e0a6ce67e1776b0d8a4ebcd40ee519b6c8339a62b05dbc9b153c0d6a17b/Flask_Migrate-4.0.4-py3-none-any.whl (20 kB)
Downloading https://mirrors.aliyun.com/pypi/packages/7f/cd/ea936f728fd0e2d148ad25dc9859d15c2bf62580ffdbfa04ce4f7aca461a/Flask_Migrate-4.0.3-py3-none-any.whl (20 kB)
Downloading https://mirrors.aliyun.com/pypi/packages/7e/26/9f3a57830627cf67c26893b7042cb0ec8c77205331636212b81ae3c35f20/Flask_Migrate-4.0.2-py3-none-any.whl (20 kB)
Downloading https://mirrors.aliyun.com/pypi/packages/26/e1/824c124993ddaac5b5ab30f930d685295c401e1a28d00012f75721edf33d/Flask_Migrate-4.0.1-py3-none-any.whl (20 kB)
Collecting alembic>=0.7
Downloading https://mirrors.aliyun.com/pypi/packages/b3/e2/8d48220731b7279911c43e95cd182961a703b939de6822b00de3ea0d3159/alembic-1.7.7-py3-none-any.whl (210 kB)
|████████████████████████████████| 210 kB 1.1 MB/s
Requirement already satisfied: SQLAlchemy>=1.3.0 in c:\programdata\anaconda3\lib\site-packages (from alembic>=0.7->flask-migrate) (1.4.52)
Requirement already satisfied: importlib-metadata in c:\programdata\anaconda3\lib\site-packages (from alembic>=0.7->flask-migrate) (4.8.3)
Collecting Mako
Downloading https://mirrors.aliyun.com/pypi/packages/b4/4d/e03d08f16ee10e688bde9016bc80af8b78c7f36a8b37c7194da48f72207e/Mako-1.1.6-py2.py3-none-any.whl (75 kB)
|████████████████████████████████| 75 kB 1.7 MB/s
Requirement already satisfied: importlib-resources in c:\programdata\anaconda3\lib\site-packages (from alembic>=0.7->flask-migrate) (5.4.0)
Requirement already satisfied: click>=7.1.2 in c:\programdata\anaconda3\lib\site-packages (from Flask>=0.9->flask-migrate) (8.0.4)
Requirement already satisfied: Jinja2>=3.0 in c:\programdata\anaconda3\lib\site-packages (from Flask>=0.9->flask-migrate) (3.0.3)
Requirement already satisfied: itsdangerous>=2.0 in c:\programdata\anaconda3\lib\site-packages (from Flask>=0.9->flask-migrate) (2.0.1)
Requirement already satisfied: Werkzeug>=2.0 in c:\programdata\anaconda3\lib\site-packages (from Flask>=0.9->flask-migrate) (2.0.3)
Requirement already satisfied: colorama in c:\programdata\anaconda3\lib\site-packages (from click>=7.1.2->Flask>=0.9->flask-migrate) (0.4.5)
Requirement already satisfied: MarkupSafe>=2.0 in c:\programdata\anaconda3\lib\site-packages (from Jinja2>=3.0->Flask>=0.9->flask-migrate) (2.0.1)
Requirement already satisfied: greenlet!=0.4.17 in c:\programdata\anaconda3\lib\site-packages (from SQLAlchemy>=1.3.0->alembic>=0.7->flask-migrate) (2.0.2)
Requirement already satisfied: dataclasses in c:\programdata\anaconda3\lib\site-packages (from Werkzeug>=2.0->Flask>=0.9->flask-migrate) (0.8)
Requirement already satisfied: typing-extensions>=3.6.4 in c:\programdata\anaconda3\lib\site-packages (from importlib-metadata->alembic>=0.7->flask-migrate) (4.1.1)
Requirement already satisfied: zipp>=0.5 in c:\programdata\anaconda3\lib\site-packages (from importlib-metadata->alembic>=0.7->flask-migrate) (3.6.0)
Installing collected packages: Mako, alembic, flask-migrate
Successfully installed Mako-1.1.6 alembic-1.7.7 flask-migrate-4.0.1
- 导入依赖
from flask_migrate import Migrate
- 注释如下
# 创建表
# with app.app_context():
# db.create_all()
标签:already,flask,satisfied,migrate,ORM,Flask,packages
From: https://www.cnblogs.com/dogleftover/p/18084805