2
我想添加评论一个tabble和列创建。如何使用SQLAlchemy将注释添加到mysql中的表或列?
所以我将doc参数添加到SQLAlchemy Column类的构造函数中。
但是不要在列中添加注释。
class Notice(db.Model):
__tablename__ = "tb_notice"
__table_args__ = {'mysql_engine': 'MyISAM'}
seqno = db.Column(db.Integer, primary_key=True, autoincrement=True, doc="seqno")
title = db.Column(db.String(200), nullable=False, doc="notice title")
detail = db.Column(db.TEXT, nullable=True, doc="notice detail ")
我想知道如何添加表的评论。
它尚未实现https://bitbucket.org/zzzeek/sqlalchemy/issues/1546/feature-request-commenting-db-objects –