V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
char1998
V2EX  ›  Python

谁使用过 flask 框架下的 alembic 插件

  •  
  •   char1998 · Feb 20, 2017 · 2377 views
    This topic created in 3362 days ago, the information mentioned may be changed or developed.

    alembic

    1 .配置完所有的文件后,输入alembic upgrade head了一个Can't locate revision identified by '0aad1fa0f8d2'

    3 replies    2017-02-21 02:03:45 +08:00
    rainmakeroly
        1
    rainmakeroly  
       Feb 20, 2017 via Android
    一个原因是你可能删除了 migrations 文件夹,而数据表里面有一个 alembic 表里存在着 0aad1fa0f8d2 导致的,对应这一原因的解决方式,删除这个数据行
    char1998
        2
    char1998  
    OP
       Feb 20, 2017
    已经解决了,删除了那个数据库然后重新建立一个就好了,或者删除 alembic_version 这个表然后重新运行也是一样的
    HFcbyqP0iVO5KM05
        3
    HFcbyqP0iVO5KM05  
       Feb 21, 2017 via Android
    flask 的话可以用用 flask-migrate 哦,是对 alembic 的一个封装,相当于 flask-sqlalchemy 之于 sqlalchemy
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   911 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 21:55 · PVG 05:55 · LAX 14:55 · JFK 17:55
    ♥ Do have faith in what you're doing.