downgrade()   A
last analyzed

Complexity

Conditions 2

Size

Total Lines 3
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 2
nop 0
1
"""Add infer_concept_relations column.
2
3
Revision ID: cb568ec81000
4
Revises: 184f1bbcb916
5
Create Date: 2020-02-19 09:29:17.619082
6
"""
7
import sqlalchemy as sa
8
from alembic import op
9
10
# revision identifiers, used by Alembic.
11
revision = "cb568ec81000"
12
down_revision = "184f1bbcb916"
13
14
15
def upgrade():
16
    op.add_column(
17
        "concept",
18
        sa.Column(
19
            "infer_concept_relations",
20
            sa.Boolean(),
21
            nullable=False,
22
            server_default="true",
23
        ),
24
    )
25
26
27
def downgrade():
28
    with op.batch_alter_table("concept") as batch_op:
29
        batch_op.drop_column("infer_concept_relations")
30