From b1026fdec06b338b33ac171ac9dd122c835d840e Mon Sep 17 00:00:00 2001 From: UncleJim Date: Fri, 5 Jan 2024 04:04:31 +0000 Subject: [PATCH] splited course_info from idac_user_vs_info table --- titles/idac/schema/item.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/titles/idac/schema/item.py b/titles/idac/schema/item.py index b2253af..387c2d5 100644 --- a/titles/idac/schema/item.py +++ b/titles/idac/schema/item.py @@ -225,19 +225,29 @@ vs_info = Table( Column("id", Integer, primary_key=True, nullable=False), Column("user", ForeignKey("aime_user.id", ondelete="cascade", onupdate="cascade")), Column("battle_mode", Integer), - Column("vs_cnt", Integer), - Column("vs_win", Integer), Column("invalid", Integer), Column("str", Integer), Column("str_now", Integer), Column("lose_now", Integer), Column("break_count", Integer), Column("break_penalty_flag", Boolean), - Column("vsinfo_course_data", JSON), UniqueConstraint("user", "battle_mode", name="idac_user_vs_info_uk"), mysql_charset="utf8mb4", ) +vs_info = Table( + "idac_user_vs_course_info", + metadata, + Column("id", Integer, primary_key=True, nullable=False), + Column("user", ForeignKey("aime_user.id", ondelete="cascade", onupdate="cascade")), + Column("battle_mode", Integer), + Column("course_id", Integer), + Column("vs_cnt", Integer), + Column("vs_win", Integer), + UniqueConstraint("user", "battle_mode", "course_id", name="idac_user_vs_course_info_uk"), + mysql_charset="utf8mb4", +) + round_infos = Table( "idac_round_info", metadata,