I want to add comments a tabble and columns created.
so I add doc parameter to the constructor of SQLAlchemy Column class.
But do not add comments the 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 ")
And I wonder how to add the comment of table.
解决方案