"""add cols to songs

Revision ID: 24e14488095
Revises: 5499e052ef8
Create Date: 2016-02-13 23:37:54.009261

"""

# revision identifiers, used by Alembic.
revision = '24e14488095'
down_revision = '5499e052ef8'

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column('songs', sa.Column('artist', sa.String(length=256), nullable=True))
    op.add_column('songs', sa.Column('created', sa.DateTime(), nullable=True))
    op.add_column('songs', sa.Column('user_id', sa.Integer(), nullable=True))
    op.create_foreign_key(None, 'songs', 'users', ['user_id'], ['id'])
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    #op.drop_constraint(None, 'songs', type_='foreignkey')
    op.drop_column('songs', 'user_id')
    op.drop_column('songs', 'created')
    op.drop_column('songs', 'artist')
    ### end Alembic commands ###
