mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-26 19:34:19 +00:00
44 lines
1.6 KiB
Python
44 lines
1.6 KiB
Python
"""empty message
|
|
|
|
Revision ID: c3827cddea6e
|
|
Revises: 9d21b228d353
|
|
Create Date: 2020-07-15 12:33:24.574579
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
from sqlalchemy.dialects import postgresql
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'c3827cddea6e'
|
|
down_revision = '9d21b228d353'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_table('result_files')
|
|
op.drop_table('results')
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table('result_files',
|
|
sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
|
|
sa.Column('result_id', sa.INTEGER(), autoincrement=False, nullable=True),
|
|
sa.Column('filename', sa.VARCHAR(length=255), autoincrement=False, nullable=True),
|
|
sa.Column('dir', sa.VARCHAR(length=255), autoincrement=False, nullable=True),
|
|
sa.ForeignKeyConstraint(['result_id'], ['results.id'], name='result_files_result_id_fkey'),
|
|
sa.PrimaryKeyConstraint('id', name='result_files_pkey')
|
|
)
|
|
op.create_table('results',
|
|
sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
|
|
sa.Column('user_id', sa.INTEGER(), autoincrement=False, nullable=True),
|
|
sa.Column('corpus_metadata', postgresql.JSON(astext_type=sa.Text()), autoincrement=False, nullable=True),
|
|
sa.ForeignKeyConstraint(['user_id'], ['users.id'], name='results_user_id_fkey'),
|
|
sa.PrimaryKeyConstraint('id', name='results_pkey')
|
|
)
|
|
# ### end Alembic commands ###
|