"""empty message

Revision ID: a3af3c831b91
Revises: d450d87ebc7d
Create Date: 2022-10-14 09:25:40.374467

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'a3af3c831b91'
down_revision = 'd450d87ebc7d'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('cmf_audit',
    sa.Column('id', sa.String(length=64), nullable=False),
    sa.Column('cmf_created_at', sa.TIMESTAMP(timezone=True), nullable=False),
    sa.Column('cmf_modified_at', sa.TIMESTAMP(timezone=True), nullable=False),
    sa.Column('parent_name', sa.String(), nullable=True),
    sa.Column('audit_data', sa.TEXT(), nullable=False),
    sa.Column('operate', sa.String(length=32), nullable=False),
    sa.Column('cmf_model_name', sa.String(), nullable=False),
    sa.Column('html_diff_data', sa.TEXT(), nullable=False),
    sa.Column('cmf_author_id', sa.String(length=64), nullable=False),
    sa.Column('parent_id', sa.String(length=64), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_cmf_audit_cmf_author_id'), 'cmf_audit', ['cmf_author_id'], unique=False)
    op.create_index(op.f('ix_cmf_audit_cmf_created_at'), 'cmf_audit', ['cmf_created_at'], unique=False)
    op.create_index(op.f('ix_cmf_audit_cmf_modified_at'), 'cmf_audit', ['cmf_modified_at'], unique=False)
    op.create_index(op.f('ix_cmf_audit_parent_id'), 'cmf_audit', ['parent_id'], unique=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_cmf_audit_parent_id'), table_name='cmf_audit')
    op.drop_index(op.f('ix_cmf_audit_cmf_modified_at'), table_name='cmf_audit')
    op.drop_index(op.f('ix_cmf_audit_cmf_created_at'), table_name='cmf_audit')
    op.drop_index(op.f('ix_cmf_audit_cmf_author_id'), table_name='cmf_audit')
    op.drop_table('cmf_audit')
    # ### end Alembic commands ###
