| Total Complexity | 3 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 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 |