<filename>migrations/versions/6ae3f450df3_.py
"""empty message

Revision ID: 6ae3f450df3
Revises: <PASSWORD>
Create Date: 2015-02-11 13:43:17.780906

"""

# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = '<PASSWORD>'

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('streamer',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('reddit_username', sa.String(length=20), nullable=True),
    sa.Column('twitch_channel', sa.String(length=25), nullable=True),
    sa.Column('youtube_channel', sa.String(length=24), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('reddit_username'),
    sa.UniqueConstraint('twitch_channel'),
    sa.UniqueConstraint('youtube_channel')
    )
    op.add_column(u'stream', sa.Column('streamer_id', sa.Integer(), nullable=True))
    op.create_foreign_key(None, 'stream', 'streamer', ['streamer_id'], ['id'])
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'stream', type_='foreignkey')
    op.drop_column(u'stream', 'streamer_id')
    op.drop_table('streamer')
    ### end Alembic commands ###

<filename>migrations/versions/6ae3f450df3_.py
"""empty message

Revision ID: 6ae3f450df3
Revises: <PASSWORD>
Create Date: 2015-02-11 13:43:17.780906

"""

# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = '<PASSWORD>'

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('streamer',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('reddit_username', sa.String(length=20), nullable=True),
    sa.Column('twitch_channel', sa.String(length=25), nullable=True),
    sa.Column('youtube_channel', sa.String(length=24), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('reddit_username'),
    sa.UniqueConstraint('twitch_channel'),
    sa.UniqueConstraint('youtube_channel')
    )
    op.add_column(u'stream', sa.Column('streamer_id', sa.Integer(), nullable=True))
    op.create_foreign_key(None, 'stream', 'streamer', ['streamer_id'], ['id'])
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'stream', type_='foreignkey')
    op.drop_column(u'stream', 'streamer_id')
    op.drop_table('streamer')
    ### end Alembic commands ###

empty message  Revision ID: 6ae3f450df3 Revises: <PASSWORD> Create Date: 2015-02-11 13:43:17.780906 # revision identifiers, used by Alembic. ### commands auto generated by Alembic - please adjust! ### ### end Alembic commands ### ### commands auto generated by Alembic - please adjust! ### ### end Alembic commands ###