V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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
agentwx
V2EX  ›  Python

sqlalchemy 在创建表的时候,能不能给表字段加上注释? 看了官方文档,关于 Column 的内容,没有 comment 相关的内容。

  •  
  •   agentwx · 2016-11-23 22:10:28 +08:00 · 3508 次点击
    这是一个创建于 2707 天前的主题,其中的信息可能已经有所发展或是发生改变。
    2 条回复    2016-11-24 09:36:42 +08:00
    Sight4
        1
    Sight4  
       2016-11-24 08:50:49 +08:00   ❤️ 1
    暂时为止,不能。参考官方文档 Column 的 doc 属性说明『 doc – optional String that can be used by the ORM or similar to document attributes. This attribute does not render SQL comments (a future attribute ‘ comment ’ will achieve that).』
    agentwx
        2
    agentwx  
    OP
       2016-11-24 09:36:42 +08:00
    @Sight4 嗯, 我也看到了这个,以为还有另外的用法
    感谢~
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3260 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 12:43 · PVG 20:43 · LAX 05:43 · JFK 08:43
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.