Show WireGuard QR, full .conf and ZIP download after 3x-ui client create
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
"""Store WireGuard config fields for site-created 3x-ui clients
|
||||
|
||||
Revision ID: 0008_xui_client_config
|
||||
Revises: 0007_xui_panel_inbounds
|
||||
Create Date: 2026-07-25
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
revision: str = "0008_xui_client_config"
|
||||
down_revision: Union[str, None] = "0007_xui_panel_inbounds"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.add_column("xui_site_clients", sa.Column("address", sa.String(length=64), nullable=True))
|
||||
op.add_column("xui_site_clients", sa.Column("endpoint", sa.String(length=255), nullable=True))
|
||||
op.add_column("xui_site_clients", sa.Column("dns", sa.String(length=255), nullable=True))
|
||||
op.add_column("xui_site_clients", sa.Column("mtu", sa.Integer(), nullable=True))
|
||||
op.add_column("xui_site_clients", sa.Column("server_public_key", sa.Text(), nullable=True))
|
||||
op.add_column("xui_site_clients", sa.Column("config_text", sa.Text(), nullable=True))
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_column("xui_site_clients", "config_text")
|
||||
op.drop_column("xui_site_clients", "server_public_key")
|
||||
op.drop_column("xui_site_clients", "mtu")
|
||||
op.drop_column("xui_site_clients", "dns")
|
||||
op.drop_column("xui_site_clients", "endpoint")
|
||||
op.drop_column("xui_site_clients", "address")
|
||||
Reference in New Issue
Block a user