style: 统一 Ruff 代码格式
This commit is contained in:
@@ -25,10 +25,17 @@ def upgrade() -> None:
|
||||
return
|
||||
columns = {column["name"] for column in inspector.get_columns("huya_accounts")}
|
||||
if "login_channel" not in columns:
|
||||
op.add_column("huya_accounts", sa.Column("login_channel", sa.String(16), nullable=False, server_default=""))
|
||||
op.add_column(
|
||||
"huya_accounts",
|
||||
sa.Column(
|
||||
"login_channel", sa.String(16), nullable=False, server_default=""
|
||||
),
|
||||
)
|
||||
indexes = {index["name"] for index in inspector.get_indexes("huya_accounts")}
|
||||
if "ix_huya_accounts_login_channel" not in indexes:
|
||||
op.create_index("ix_huya_accounts_login_channel", "huya_accounts", ["login_channel"])
|
||||
op.create_index(
|
||||
"ix_huya_accounts_login_channel", "huya_accounts", ["login_channel"]
|
||||
)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
|
||||
Reference in New Issue
Block a user