"""Added ChatHistory table

Revision ID: 8482e883fa57
Revises: <PASSWORD>
Create Date: 2016-07-16 17:37:14.681326

"""

# revision identifiers, used by Alembic.
revision = '8482e883fa57'
down_revision = '0<PASSWORD>'
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('chat_history',
    sa.Column('id', sa.String(length=36), nullable=False),
    sa.Column('message', sa.String(length=4096), nullable=True),
    sa.Column('published_by', sa.String(length=36), nullable=True),
    sa.Column('channel', sa.String(length=36), nullable=True),
    sa.Column('created_on', sa.TIMESTAMP(), server_default=sa.text(u'CURRENT_TIMESTAMP'), nullable=False),
    sa.Column('deleted_on', sa.DateTime(), nullable=True),
    sa.ForeignKeyConstraint(['channel'], ['channel.id'], ),
    sa.ForeignKeyConstraint(['published_by'], ['user.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    ### end Alembic commands ###


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

"""Added ChatHistory table

Revision ID: 8482e883fa57
Revises: <PASSWORD>
Create Date: 2016-07-16 17:37:14.681326

"""

# revision identifiers, used by Alembic.
revision = '8482e883fa57'
down_revision = '0<PASSWORD>'
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('chat_history',
    sa.Column('id', sa.String(length=36), nullable=False),
    sa.Column('message', sa.String(length=4096), nullable=True),
    sa.Column('published_by', sa.String(length=36), nullable=True),
    sa.Column('channel', sa.String(length=36), nullable=True),
    sa.Column('created_on', sa.TIMESTAMP(), server_default=sa.text(u'CURRENT_TIMESTAMP'), nullable=False),
    sa.Column('deleted_on', sa.DateTime(), nullable=True),
    sa.ForeignKeyConstraint(['channel'], ['channel.id'], ),
    sa.ForeignKeyConstraint(['published_by'], ['user.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    ### end Alembic commands ###


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

Added ChatHistory table  Revision ID: 8482e883fa57 Revises: <PASSWORD> Create Date: 2016-07-16 17:37:14.681326 # 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 ###