"""empty message

Revision ID: fd930e908bf4
Revises: 
Create Date: 2021-04-04 15:00:56.158468

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('music_videos',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('title', sa.String(length=255), nullable=False),
    sa.Column('artist', sa.String(), nullable=False),
    sa.Column('genre', sa.String(), nullable=False),
    sa.Column('coverart', sa.String(), nullable=False),
    sa.Column('video_url', sa.String(), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('users',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('username', sa.String(length=40), nullable=False),
    sa.Column('email', sa.String(length=255), nullable=False),
    sa.Column('hashed_password', sa.String(length=255), nullable=False),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('email'),
    sa.UniqueConstraint('username')
    )
    op.create_table('lists',
    sa.Column('profile_id', sa.Integer(), nullable=True),
    sa.Column('music_video_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['music_video_id'], ['music_videos.id'], ),
    sa.ForeignKeyConstraint(['profile_id'], ['users.id'], )
    )
    op.create_table('reviews',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('comment', sa.Text(), nullable=False),
    sa.Column('rating', sa.Integer(), nullable=True),
    sa.Column('user_id', sa.Integer(), nullable=False),
    sa.Column('music_video_id', sa.Integer(), nullable=False),
    sa.ForeignKeyConstraint(['music_video_id'], ['music_videos.id'], ),
    sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('reviews')
    op.drop_table('lists')
    op.drop_table('users')
    op.drop_table('music_videos')
    # ### end Alembic commands ###
