增加科目表的id

This commit is contained in:
2026-09-22 15:33:09 +08:00
parent 6de3d1dd22
commit daed5971ea
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -48,8 +48,12 @@ class Tea(Base):
#科目表
class Sub(Base):
__tablename__ = 'subject'
id = Column(Integer
, primary_key=True
, nullable=False
, autoincrement=True
, comment='id')
name = Column(String(50)
, primary_key=True
,nullable=False
,comment='科目名字')