mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-22 07:07:46 +00:00
🐛 Fix the exception raised when both sa_column and primary_key are passed simultaneously
This commit is contained in:
parent
c5416d7b3d
commit
a5ffb257c2
@ -10,9 +10,7 @@ class AnswerDB(SQLModel, table=True):
|
||||
__tablename__ = "answer"
|
||||
__table_args__ = dict(mysql_charset="utf8mb4", mysql_collate="utf8mb4_general_ci")
|
||||
|
||||
id: Optional[int] = Field(
|
||||
default=None, primary_key=True, sa_column=Column(Integer, primary_key=True, autoincrement=True)
|
||||
)
|
||||
id: Optional[int] = Field(default=None, sa_column=Column(Integer, primary_key=True, autoincrement=True))
|
||||
question_id: Optional[int] = Field(
|
||||
sa_column=Column(Integer, ForeignKey("question.id", ondelete="RESTRICT", onupdate="RESTRICT"))
|
||||
)
|
||||
@ -24,9 +22,7 @@ class QuestionDB(SQLModel, table=True):
|
||||
__tablename__ = "question"
|
||||
__table_args__ = dict(mysql_charset="utf8mb4", mysql_collate="utf8mb4_general_ci")
|
||||
|
||||
id: Optional[int] = Field(
|
||||
default=None, primary_key=True, sa_column=Column(Integer, primary_key=True, autoincrement=True)
|
||||
)
|
||||
id: Optional[int] = Field(default=None, sa_column=Column(Integer, primary_key=True, autoincrement=True))
|
||||
text: Optional[str] = Field()
|
||||
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 94dc4773d9dcc70fb12e58356bea4288bc82f1f6
|
||||
Subproject commit e454db0f760c7c395eabab6f62cc524d50f9d935
|
Loading…
Reference in New Issue
Block a user