"""empty message

Revision ID: 8a08135236cf
Revises: 5387f698c59d
Create Date: 2019-09-28 13:55:53.811941

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '8a08135236cf'
down_revision = '5387f698c59d'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('socialmedia',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('id_share', sa.String(), nullable=False),
    sa.Column('author_name', sa.String(), nullable=False),
    sa.Column('media_id', sa.String(), nullable=False),
    sa.Column('media_description', sa.String(), nullable=False),
    sa.Column('media_image', sa.String(), nullable=False),
    sa.Column('provider_name', sa.String(), nullable=False),
    sa.Column('delete', sa.Boolean(), nullable=False),
    sa.Column('disable', sa.Boolean(), nullable=False),
    sa.Column('verification', sa.Boolean(), nullable=False),
    sa.Column('sponsor', sa.Boolean(), nullable=False),
    sa.Column('creation_date', sa.DateTime(), nullable=False),
    sa.Column('last_update', sa.DateTime(), nullable=False),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('id_share')
    )
    op.create_table('socialcountrytargets',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('country_id', sa.Integer(), nullable=False),
    sa.Column('social_id', sa.Integer(), nullable=False),
    sa.ForeignKeyConstraint(['country_id'], ['countries.id'], ),
    sa.ForeignKeyConstraint(['social_id'], ['socialmedia.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('socialreports',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('user_id', sa.Integer(), nullable=False),
    sa.Column('description', sa.String(), nullable=False),
    sa.Column('read', sa.Boolean(), nullable=False),
    sa.Column('creation_date', sa.DateTime(), nullable=False),
    sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('socialsaved',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('user_id', sa.Integer(), nullable=False),
    sa.Column('social_id', sa.Integer(), nullable=False),
    sa.Column('creation_date', sa.DateTime(), nullable=False),
    sa.ForeignKeyConstraint(['social_id'], ['socialmedia.id'], ),
    sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('socialstatistics',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('user_id', sa.Integer(), nullable=False),
    sa.Column('social_id', sa.Integer(), nullable=False),
    sa.Column('display', sa.Boolean(), nullable=False),
    sa.Column('clicks', sa.Boolean(), nullable=False),
    sa.Column('creation_date', sa.DateTime(), nullable=False),
    sa.ForeignKeyConstraint(['social_id'], ['socialmedia.id'], ),
    sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('socialtagtargets',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('tag_id', sa.Integer(), nullable=False),
    sa.Column('social_id', sa.Integer(), nullable=False),
    sa.ForeignKeyConstraint(['social_id'], ['socialmedia.id'], ),
    sa.ForeignKeyConstraint(['tag_id'], ['tags.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('socialtagtargets')
    op.drop_table('socialstatistics')
    op.drop_table('socialsaved')
    op.drop_table('socialreports')
    op.drop_table('socialcountrytargets')
    op.drop_table('socialmedia')
    # ### end Alembic commands ###
