sqlalchemy无法删除制表符

2024-10-01 15:38:34 发布

您现在位置:Python中文网/ 问答频道 /正文

我使用下一个代码创建表:

class tableName(self._dbHelper.DeclarativeBase):
                __tablename__ = "tableName"
                if not tableEngine is None:
                    __table_args__ = {'mysql_engine' : tableEngine}
                first = Column(Integer, primary_key = True, autoincrement = True)
                second = Column(String(45))
                third = Column(String(100))

                def __init__(self, second = Utils.uniqID(), third = Utils.uniqID()):
                    self.second = second
                    self.third = third

但当我试图删除table时,出现了一个错误:tableName不包含drop()方法 我怎么才能放下这张桌子?在


Tags: 代码selftruestringtablecolumnutilsclass

热门问题