"""initial database migration

Revision ID: b710d30d1e63
Revises: 
Create Date: 2021-02-27 17:17:36.507953

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('audiobooks',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('title', sa.String(length=100), nullable=False),
    sa.Column('author', sa.String(length=100), nullable=False),
    sa.Column('narrator', sa.String(length=100), nullable=False),
    sa.Column('duration', sa.Integer(), nullable=False),
    sa.Column('uploaded_time', sa.DateTime(), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('podcasts',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('name', sa.String(length=100), nullable=False),
    sa.Column('duration', sa.Integer(), nullable=False),
    sa.Column('host', sa.String(length=100), nullable=False),
    sa.Column('uploaded_time', sa.DateTime(), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('songs',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('name', sa.String(length=100), nullable=False),
    sa.Column('duration', sa.Integer(), nullable=False),
    sa.Column('uploaded_time', sa.DateTime(), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('songs')
    op.drop_table('podcasts')
    op.drop_table('audiobooks')
    # ### end Alembic commands ###
