V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
billycs
V2EX  ›  Flask

请问用 flask_ sqlalchemy 创建表,如何给表添加 comment 注释呢

  •  
  •   billycs · 2018-09-19 16:34:54 +08:00 · 2074 次点击
    这是一个创建于 2018 天前的主题,其中的信息可能已经有所发展或是发生改变。

    比如:

    class Users(db.Model):
        '''用户表'''
        __tablename__ = 'users'
        user_id = db.Column(db.Integer, primary_key=True)
        password = db.Column(db.String(64), unique=True, index=True, comment='密码‘)
    

    这张表的注释应该如何设置呢?没有找到相关文档,很初级的问题,抱歉了!

    1 条回复    2018-09-19 16:57:32 +08:00
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3391 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 10:40 · PVG 18:40 · LAX 03:40 · JFK 06:40
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.