forked from mtusi2026/mtusi2026lab7
Implement lab 7 transport security and worker containment
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
revision = "0008_login_budget"
|
||||
down_revision = "0007_trace_context"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.create_table(
|
||||
"login_budget",
|
||||
sa.Column("id", sa.Integer(), primary_key=True),
|
||||
sa.Column("window", sa.BigInteger(), nullable=False),
|
||||
sa.Column("attempts", sa.Integer(), nullable=False),
|
||||
sa.CheckConstraint("id = 1 AND attempts > 0"),
|
||||
)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_table("login_budget")
|
||||
Reference in New Issue
Block a user