Skip to content
Snippets Groups Projects
Commit ebba2913 authored by Patrick Jentsch's avatar Patrick Jentsch
Browse files

Add migration script for corpora table.

parent 525d53a9
No related branches found
No related tags found
No related merge requests found
"""Add corpora table
Revision ID: 60d474dea68f
Revises: 717796966c8c
Create Date: 2019-08-06 12:03:30.639380
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '60d474dea68f'
down_revision = '717796966c8c'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('corpora',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('description', sa.String(length=64), nullable=True),
sa.Column('title', sa.String(length=32), nullable=True),
sa.Column('user_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
sa.PrimaryKeyConstraint('id')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('corpora')
# ### end Alembic commands ###
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment