"""empty message

Revision ID: 56c5fc986109
Revises: 
Create Date: 2020-10-15 13:24:35.550940

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '56c5fc986109'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('cmf_auth',
    sa.Column('cmf_author_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_created_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_deleted', sa.Boolean(), nullable=False),
    sa.Column('cmf_locked_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_locked_by_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_modified_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('cmf_modified_by_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_owner_id', sa.CHAR(length=64), nullable=True),
    sa.Column('cmf_version', sa.Integer(), nullable=True),
    sa.Column('cmf_viewed_at', sa.TIMESTAMP(timezone=True), nullable=True),
    sa.Column('description', sa.String(length=4096), nullable=True),
    sa.Column('email', sa.String(length=64), nullable=True),
    sa.Column('groups', sa.TEXT(), nullable=True),
    sa.Column('hash_ntlmv2', sa.String(length=256), nullable=True),
    sa.Column('id', sa.CHAR(length=64), nullable=False),
    sa.Column('login', sa.String(length=64), nullable=True),
    sa.Column('name', sa.String(length=256), nullable=True),
    sa.Column('pass_hash', sa.String(length=256), nullable=True),
    sa.Column('phone', sa.String(length=32), nullable=True),
    sa.Column('posix_gid', sa.Integer(), nullable=True),
    sa.Column('posix_uid', sa.Integer(), nullable=True),
    sa.Column('scope', sa.String(length=4096), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_cmf_auth_cmf_author_id'), 'cmf_auth', ['cmf_author_id'], unique=False)
    op.create_index(op.f('ix_cmf_auth_cmf_locked_by_id'), 'cmf_auth', ['cmf_locked_by_id'], unique=False)
    op.create_index(op.f('ix_cmf_auth_cmf_modified_by_id'), 'cmf_auth', ['cmf_modified_by_id'], unique=False)
    op.create_index(op.f('ix_cmf_auth_cmf_owner_id'), 'cmf_auth', ['cmf_owner_id'], unique=False)
    op.create_index(op.f('ix_cmf_auth_email'), 'cmf_auth', ['email'], unique=True)
    op.create_index(op.f('ix_cmf_auth_login'), 'cmf_auth', ['login'], unique=True)
    op.create_index(op.f('ix_cmf_auth_name'), 'cmf_auth', ['name'], unique=False)
    op.create_index(op.f('ix_cmf_auth_posix_gid'), 'cmf_auth', ['posix_gid'], unique=True)
    op.create_index(op.f('ix_cmf_auth_posix_uid'), 'cmf_auth', ['posix_uid'], unique=True)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_cmf_auth_posix_uid'), table_name='cmf_auth')
    op.drop_index(op.f('ix_cmf_auth_posix_gid'), table_name='cmf_auth')
    op.drop_index(op.f('ix_cmf_auth_name'), table_name='cmf_auth')
    op.drop_index(op.f('ix_cmf_auth_login'), table_name='cmf_auth')
    op.drop_index(op.f('ix_cmf_auth_email'), table_name='cmf_auth')
    op.drop_index(op.f('ix_cmf_auth_cmf_owner_id'), table_name='cmf_auth')
    op.drop_index(op.f('ix_cmf_auth_cmf_modified_by_id'), table_name='cmf_auth')
    op.drop_index(op.f('ix_cmf_auth_cmf_locked_by_id'), table_name='cmf_auth')
    op.drop_index(op.f('ix_cmf_auth_cmf_author_id'), table_name='cmf_auth')
    op.drop_table('cmf_auth')
    # ### end Alembic commands ###
