app/migrations/versions/2025_072815_9e80159405af_.py
Adrià Casajús 6f391511b0 Add migration
2025-07-28 15:33:20 +02:00

37 lines
1 KiB
Python

"""empty message
Revision ID: 9e80159405af
Revises: e38002759d8f
Create Date: 2025-07-28 15:14:34.829598
"""
import sqlalchemy_utils
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '9e80159405af'
down_revision = 'e38002759d8f'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('forbidden_mx_ip',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sqlalchemy_utils.types.arrow.ArrowType(), nullable=False),
sa.Column('updated_at', sqlalchemy_utils.types.arrow.ArrowType(), nullable=True),
sa.Column('ip', sa.String(length=16), nullable=False),
sa.Column('comment', sa.Text(), nullable=True),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('ip')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('forbidden_mx_ip')
# ### end Alembic commands ###