availabili.tf/backend-flask/migrations/versions/fda727438444_add_match_tabl...

36 lines
1002 B
Python

"""Add match table
Revision ID: fda727438444
Revises: c242e3f99c64
Create Date: 2024-12-09 12:45:16.974122
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'fda727438444'
down_revision = 'c242e3f99c64'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('matches',
sa.Column('logs_tf_id', sa.Integer(), nullable=False),
sa.Column('logs_tf_title', sa.String(length=255), nullable=False),
sa.Column('duration', sa.Interval(), nullable=False),
sa.Column('match_time', sa.TIMESTAMP(), nullable=False),
sa.Column('created_at', sa.TIMESTAMP(), server_default=sa.text('(CURRENT_TIMESTAMP)'), nullable=False),
sa.PrimaryKeyConstraint('logs_tf_id')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('matches')
# ### end Alembic commands ###