Change db values Corpus.current_nr_or_tokens and Corpus.max_nr_of_tokens from BIGINT to Integer

This commit is contained in:
Patrick Jentsch 2021-01-28 11:29:58 +01:00
parent a30ade34b1
commit c8dc215c02

View File

@ -0,0 +1,42 @@
"""empty message
Revision ID: 790ce9512e75
Revises: 6c2227f1cc77
Create Date: 2021-01-25 11:13:36.953269
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '790ce9512e75'
down_revision = '6c2227f1cc77'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('corpora', 'current_nr_of_tokens',
existing_type=sa.BIGINT(),
type_=sa.Integer(),
existing_nullable=True)
op.alter_column('corpora', 'max_nr_of_tokens',
existing_type=sa.BIGINT(),
type_=sa.Integer(),
existing_nullable=True)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('corpora', 'max_nr_of_tokens',
existing_type=sa.Integer(),
type_=sa.BIGINT(),
existing_nullable=True)
op.alter_column('corpora', 'current_nr_of_tokens',
existing_type=sa.Integer(),
type_=sa.BIGINT(),
existing_nullable=True)
# ### end Alembic commands ###