From c8dc215c02d9216c31bd964b837268ff39800754 Mon Sep 17 00:00:00 2001
From: Patrick Jentsch
Date: Thu, 28 Jan 2021 11:29:58 +0100
Subject: [PATCH] Change db values Corpus.current_nr_or_tokens and
Corpus.max_nr_of_tokens from BIGINT to Integer
---
web/migrations/versions/790ce9512e75_.py | 42 ++++++++++++++++++++++++
1 file changed, 42 insertions(+)
create mode 100644 web/migrations/versions/790ce9512e75_.py
diff --git a/web/migrations/versions/790ce9512e75_.py b/web/migrations/versions/790ce9512e75_.py
new file mode 100644
index 00000000..033b8d37
--- /dev/null
+++ b/web/migrations/versions/790ce9512e75_.py
@@ -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 ###