增加了代理平台和日志
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
"""代理白名单平台抽象:新增 whitelist_platform / whitelist_credentials 字段
|
||||
|
||||
Revision ID: 20260624_0003
|
||||
Revises: 20260624_0002
|
||||
Create Date: 2026-06-24
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
revision: str = "20260624_0003"
|
||||
down_revision: Union[str, None] = "20260624_0002"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
with op.batch_alter_table("proxy_config") as batch:
|
||||
batch.add_column(
|
||||
sa.Column("whitelist_platform", sa.String(32), server_default="xiequ")
|
||||
)
|
||||
batch.add_column(
|
||||
sa.Column("whitelist_credentials", sa.JSON(), nullable=True)
|
||||
)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
with op.batch_alter_table("proxy_config") as batch:
|
||||
batch.drop_column("whitelist_credentials")
|
||||
batch.drop_column("whitelist_platform")
|
||||
Reference in New Issue
Block a user