"""Add columns to AuditEvent

Revision ID: 4f46aecb337f
Revises: 4c0b8263d800
Create Date: 2018-11-12 16:03:55.281648

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision = '4f46aecb337f'
down_revision = '4c0b8263d800'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('audit_events', sa.Column('changed_state', postgresql.JSON(astext_type=sa.Text()), nullable=True))
    op.add_column('audit_events', sa.Column('event_details', postgresql.JSON(astext_type=sa.Text()), nullable=True))
    # ### end Alembic commands ###


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