🏡 index : ~doyle/dave.git

"""Add messages table

Revision ID: 7836665787cd
Revises: 0689a529bce0
Create Date: 2016-11-12 08:20:05.648069

"""

# revision identifiers, used by Alembic.
revision = '7836665787cd'
down_revision = '0689a529bce0'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('messages',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('nick', sa.String(), nullable=True),
    sa.Column('channel', sa.String(), nullable=True),
    sa.Column('message', sa.String(), nullable=True),
    sa.Column('userhost', sa.String(), nullable=True),
    sa.Column('created_at', sa.DateTime(), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.drop_constraint(u'locations_nick_key', 'locations', type_='unique')
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_unique_constraint(u'locations_nick_key', 'locations', ['nick'])
    op.drop_table('messages')
    ### end Alembic commands ###