Flask管理数据库
Flask管理数据库
flask-migrate+flask-script
一、第一种方式
-
使用如下命令进入python shell
python manage.py shell -
输入指令即可,例如:
db.drop_all() db.create_all()
二、第二种方式
直接使用指令,例如:
python3 manage.py db init
python3 manage.py db migrate
python3 mange.py db upgrade
python3 mange.py db --help

浙公网安备 33010602011771号