26 lines
655 B
Python
26 lines
655 B
Python
"""Adding in messages table
|
|
|
|
Revision ID: a3002f7638d5
|
|
Revises: c9b91bee7554
|
|
Create Date: 2016-10-07 11:14:15.054546
|
|
|
|
"""
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'a3002f7638d5'
|
|
down_revision = 'c9b91bee7554'
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
from sqlalchemy.dialects import mysql
|
|
|
|
def upgrade(tables):
|
|
op.create_table('messages',
|
|
sa.Column("id", sa.INTEGER, primary_key=True),
|
|
sa.Column("content", sa.UnicodeText, nullable=False),
|
|
sa.PrimaryKeyConstraint('id', name=op.f('pk_messages'))
|
|
)
|
|
|
|
|
|
def downgrade(tables):
|
|
op.drop_table('messages')
|