Adding in a new message data model and the corresponding methods to in the API.

This commit is contained in:
charltonaustin 2016-10-07 15:56:58 -04:00
parent 7d8cc1fc34
commit 1e733ddffb
8 changed files with 60 additions and 4 deletions

View file

@ -0,0 +1,26 @@
"""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')