"""empty message

Revision ID: fdef00edf586
Revises: 9872268b54d4
Create Date: 2022-06-13 15:26:02.065002

"""
from datetime import datetime

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'fdef00edf586'
down_revision = '9872268b54d4'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('matches', sa.Column('date', sa.DateTime(), nullable=True))
    date = sa.table('matches', sa.column('date'))
    op.execute(date.update().values(date=datetime.utcnow()))
    op.alter_column('matches', 'date', nullable=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('matches', 'date')
    # ### end Alembic commands ###
