mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-24 10:34:17 +00:00
Add migration script for corpora table.
This commit is contained in:
parent
525d53a906
commit
ebba2913f8
35
migrations/versions/60d474dea68f_add_corpora_table.py
Normal file
35
migrations/versions/60d474dea68f_add_corpora_table.py
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
"""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 ###
|
Loading…
Reference in New Issue
Block a user