feat: 账号可配置 HTTP/HTTPS/SOCKS 代理
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
"""账号 HTTP/SOCKS 代理。"""
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
revision = "0008_proxy"
|
||||
down_revision = "0007_autostudy"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
with op.batch_alter_table("accounts") as batch:
|
||||
batch.add_column(sa.Column("proxy_scheme", sa.String(length=16), nullable=False, server_default=""))
|
||||
batch.add_column(sa.Column("proxy_host", sa.String(length=255), nullable=False, server_default=""))
|
||||
batch.add_column(sa.Column("proxy_port", sa.Integer(), nullable=True))
|
||||
batch.add_column(sa.Column("proxy_username", sa.String(length=128), nullable=False, server_default=""))
|
||||
batch.add_column(sa.Column("proxy_password_cipher", sa.Text(), nullable=False, server_default=""))
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
with op.batch_alter_table("accounts") as batch:
|
||||
batch.drop_column("proxy_password_cipher")
|
||||
batch.drop_column("proxy_username")
|
||||
batch.drop_column("proxy_port")
|
||||
batch.drop_column("proxy_host")
|
||||
batch.drop_column("proxy_scheme")
|
||||
Reference in New Issue
Block a user