mirror of
https://github.com/PaiGramTeam/MibooGram.git
synced 2024-11-22 15:37:21 +00:00
62 lines
1.8 KiB
Python
62 lines
1.8 KiB
Python
|
"""gacha_log_rank
|
||
|
|
||
|
Revision ID: 1220c5c80757
|
||
|
Revises: 87c6195e5306
|
||
|
Create Date: 2024-09-12 12:02:16.283418
|
||
|
|
||
|
"""
|
||
|
|
||
|
from alembic import op
|
||
|
import sqlalchemy as sa
|
||
|
|
||
|
# revision identifiers, used by Alembic.
|
||
|
revision = "1220c5c80757"
|
||
|
down_revision = "87c6195e5306"
|
||
|
branch_labels = None
|
||
|
depends_on = None
|
||
|
|
||
|
|
||
|
def upgrade() -> None:
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
op.create_table(
|
||
|
"gacha_log_rank",
|
||
|
sa.Column("id", sa.Integer(), autoincrement=True, nullable=False),
|
||
|
sa.Column("player_id", sa.BigInteger(), nullable=False),
|
||
|
sa.Column(
|
||
|
"type",
|
||
|
sa.Enum(
|
||
|
"CHARACTER",
|
||
|
"WEAPON",
|
||
|
"DEFAULT",
|
||
|
"DEFAULT_WEAPON",
|
||
|
"HUN",
|
||
|
"PET",
|
||
|
name="gachalogtypeenum",
|
||
|
),
|
||
|
nullable=False,
|
||
|
),
|
||
|
sa.Column("score_1", sa.BigInteger(), nullable=True),
|
||
|
sa.Column("score_2", sa.BigInteger(), nullable=True),
|
||
|
sa.Column("score_3", sa.BigInteger(), nullable=True),
|
||
|
sa.Column("score_4", sa.BigInteger(), nullable=True),
|
||
|
sa.Column("score_5", sa.BigInteger(), nullable=True),
|
||
|
sa.Column("data", sa.JSON(), nullable=True),
|
||
|
sa.Column(
|
||
|
"time_created",
|
||
|
sa.DateTime(),
|
||
|
server_default=sa.text("now()"),
|
||
|
nullable=True,
|
||
|
),
|
||
|
sa.Column("time_updated", sa.DateTime(), nullable=True),
|
||
|
sa.PrimaryKeyConstraint("id", "player_id", "type"),
|
||
|
mysql_charset="utf8mb4",
|
||
|
mysql_collate="utf8mb4_general_ci",
|
||
|
)
|
||
|
# ### end Alembic commands ###
|
||
|
|
||
|
|
||
|
def downgrade() -> None:
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
op.drop_table("gacha_log_rank")
|
||
|
# ### end Alembic commands ###
|