"""empty message

Revision ID: be15d060096c
Revises: 
Create Date: 2021-08-03 21:09:26.949575

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('leakbuster_leakSource',
    sa.Column('id', sa.String(length=32), nullable=False),
    sa.Column('url', sa.String(length=200), nullable=True),
    sa.Column('date', sa.String(length=200), nullable=True),
    sa.Column('descri', sa.String(length=400), nullable=True),
    sa.Column('author', sa.String(length=200), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('url')
    )
    op.create_table('leakbuster_user',
    sa.Column('id', sa.String(length=32), nullable=False),
    sa.Column('name', sa.String(length=50), nullable=False),
    sa.Column('password', sa.String(length=128), nullable=False),
    sa.Column('roles', sa.String(length=5), nullable=False),
    sa.Column('phone', sa.String(length=50), nullable=False),
    sa.Column('email', sa.String(length=100), nullable=False),
    sa.Column('callback', sa.String(length=100), nullable=False),
    sa.Column('company', sa.String(length=300), nullable=False),
    sa.Column('cdomain', sa.String(length=300), nullable=False),
    sa.Column('site', sa.String(length=300), nullable=False),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('callback'),
    sa.UniqueConstraint('cdomain'),
    sa.UniqueConstraint('email'),
    sa.UniqueConstraint('name'),
    sa.UniqueConstraint('phone'),
    sa.UniqueConstraint('site')
    )
    op.create_table('leakbuster_leakCPFCNPJ',
    sa.Column('id', sa.String(length=32), nullable=False),
    sa.Column('CPF_CNPJ', sa.String(length=100), nullable=False),
    sa.Column('leak_id', sa.String(length=32), nullable=True),
    sa.ForeignKeyConstraint(['leak_id'], ['leakbuster_leakSource.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('leakbuster_leakEmail',
    sa.Column('id', sa.String(length=32), nullable=False),
    sa.Column('email', sa.String(length=500), nullable=True),
    sa.Column('leak_id', sa.String(length=32), nullable=True),
    sa.ForeignKeyConstraint(['leak_id'], ['leakbuster_leakSource.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('leakbuster_leakGeneral',
    sa.Column('id', sa.String(length=32), nullable=False),
    sa.Column('leaks', sa.String(length=100), nullable=True),
    sa.Column('leak_id', sa.String(length=32), nullable=True),
    sa.ForeignKeyConstraint(['leak_id'], ['leakbuster_leakSource.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('leakbuster_leakWarning',
    sa.Column('id', sa.String(length=32), nullable=False),
    sa.Column('warning_type', sa.String(length=6), nullable=False),
    sa.Column('comp_domain', sa.String(length=300), nullable=False),
    sa.Column('password', sa.String(length=128), nullable=False),
    sa.Column('email', sa.String(length=500), nullable=True),
    sa.Column('leak_id', sa.String(length=32), nullable=True),
    sa.ForeignKeyConstraint(['leak_id'], ['leakbuster_leakSource.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('leakbuster_leakPassword',
    sa.Column('id', sa.String(length=32), nullable=False),
    sa.Column('password', sa.String(length=600), nullable=True),
    sa.Column('leak_id', sa.String(length=32), nullable=True),
    sa.Column('email_id', sa.String(length=32), nullable=True),
    sa.ForeignKeyConstraint(['email_id'], ['leakbuster_leakEmail.id'], ),
    sa.ForeignKeyConstraint(['leak_id'], ['leakbuster_leakSource.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('leakbuster_validatedEmails',
    sa.Column('id', sa.String(length=32), nullable=False),
    sa.Column('valid_email', sa.Boolean(), nullable=False),
    sa.Column('email_id', sa.String(length=32), nullable=True),
    sa.ForeignKeyConstraint(['email_id'], ['leakbuster_leakEmail.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('leakbuster_validatedEmails')
    op.drop_table('leakbuster_leakPassword')
    op.drop_table('leakbuster_leakWarning')
    op.drop_table('leakbuster_leakGeneral')
    op.drop_table('leakbuster_leakEmail')
    op.drop_table('leakbuster_leakCPFCNPJ')
    op.drop_table('leakbuster_user')
    op.drop_table('leakbuster_leakSource')
    # ### end Alembic commands ###
