little update

This commit is contained in:
2026-08-12 21:11:39 +03:00
parent e3d5de12fe
commit 3af436d48a
37 changed files with 2299 additions and 9 deletions

View File

@@ -0,0 +1,32 @@
"""create network pool
Revision ID: 20260812_01
Revises:
Create Date: 2026-08-12
"""
from alembic import op
import sqlalchemy as sa
revision = "20260812_01"
down_revision = None
branch_labels = None
depends_on = None
def upgrade() -> None:
op.create_table(
"network_pool",
sa.Column("cidr", sa.String(length=18), nullable=False),
sa.Column("cloud_subnet_id", sa.String(length=64), nullable=False),
sa.Column("game_id", sa.Uuid(), nullable=True),
sa.Column("allocated_at", sa.DateTime(timezone=True), nullable=True),
sa.Column("created_at", sa.DateTime(timezone=True), server_default=sa.text("CURRENT_TIMESTAMP"), nullable=False),
sa.PrimaryKeyConstraint("cidr"),
sa.UniqueConstraint("cloud_subnet_id"),
sa.UniqueConstraint("game_id"),
)
def downgrade() -> None:
op.drop_table("network_pool")