"""add user and duration to logs

Revision ID: 9e817a4a5cec
Revises: b74cd7a31b69
Create Date: 2021-04-24 10:05:16.592958

"""

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = "9e817a4a5cec"
down_revision = "b74cd7a31b69"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column("access_log", sa.Column("request_duration", sa.Float(), nullable=True))
    op.add_column("access_log", sa.Column("user", sa.String(), nullable=True))
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("access_log", "user")
    op.drop_column("access_log", "request_duration")
    # ### end Alembic commands ###
