mirror of
https://github.com/PaiGramTeam/MibooGram.git
synced 2024-11-16 04:45:27 +00:00
8c8fa8ea99
* 💄 Format with black 24.x.x * 💄 Update black version to 24.x.x in pre-commit check
61 lines
1.5 KiB
Python
61 lines
1.5 KiB
Python
"""tasks_daily
|
|
|
|
Revision ID: 89dcb9109475
|
|
Revises: 27aaa52f9d4a
|
|
Create Date: 2024-03-10 10:48:10.227236
|
|
|
|
"""
|
|
|
|
from alembic import op
|
|
from sqlalchemy.dialects import mysql
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = "89dcb9109475"
|
|
down_revision = "27aaa52f9d4a"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.alter_column(
|
|
"task",
|
|
"type",
|
|
existing_type=mysql.ENUM(
|
|
"SIGN",
|
|
"RESIN",
|
|
"REALM",
|
|
"EXPEDITION",
|
|
"TRANSFORMER",
|
|
"CARD",
|
|
"DAILY",
|
|
collation="utf8mb4_general_ci",
|
|
),
|
|
nullable=False,
|
|
)
|
|
op.drop_index("task_1", table_name="task")
|
|
op.create_index(op.f("ix_task_user_id"), "task", ["user_id"], unique=False)
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_index(op.f("ix_task_user_id"), table_name="task")
|
|
op.create_index("task_1", "task", ["user_id"], unique=False)
|
|
op.alter_column(
|
|
"task",
|
|
"type",
|
|
existing_type=mysql.ENUM(
|
|
"SIGN",
|
|
"RESIN",
|
|
"REALM",
|
|
"EXPEDITION",
|
|
"TRANSFORMER",
|
|
"CARD",
|
|
collation="utf8mb4_general_ci",
|
|
),
|
|
nullable=True,
|
|
)
|
|
op.alter_column("task", "user_id", existing_type=mysql.BIGINT(), nullable=True)
|
|
# ### end Alembic commands ###
|