All checks were successful
Dev / docker (push) Successful in 2m6s
- Add peer-to-peer and LAN-to-peers switches on the rules page - Both settings persisted in configurations table and applied as nftables chains on toggle - Add "View nftables Rules" button to dump the live ruleset for troubleshooting - Rules page redesigned with card-based layout matching other admin pages - Rule create/edit/delete events fire as background tasks
28 lines
869 B
Python
28 lines
869 B
Python
"""add firewall policy fields to configurations
|
|
|
|
Revision ID: b7e2f4a1c903
|
|
Revises: a3f1d8e92b01
|
|
Create Date: 2026-03-31 00:00:00.000000
|
|
|
|
"""
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision: str = 'b7e2f4a1c903'
|
|
down_revision: Union[str, None] = 'a3f1d8e92b01'
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.add_column('configurations', sa.Column('allow_peer_to_peer', sa.Boolean(), nullable=False, server_default='false'))
|
|
op.add_column('configurations', sa.Column('allow_lan_to_peers', sa.Boolean(), nullable=False, server_default='false'))
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.drop_column('configurations', 'allow_lan_to_peers')
|
|
op.drop_column('configurations', 'allow_peer_to_peer')
|