Coverage for mindsdb / migrations / versions / 2022-08-25_6a54ba55872e_view_integration.py: 60%
15 statements
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-21 00:36 +0000
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-21 00:36 +0000
1"""view_integration
3Revision ID: 6a54ba55872e
4Revises: 6e834843e7e9
5Create Date: 2022-08-25 14:52:44.269082
7"""
8from alembic import op
9import sqlalchemy as sa
10import mindsdb.interfaces.storage.db # noqa
13# revision identifiers, used by Alembic.
14revision = '6a54ba55872e'
15down_revision = '976f15a37e6a'
16branch_labels = None
17depends_on = None
20def upgrade():
21 # ### commands auto generated by Alembic - please adjust! ###
23 with op.batch_alter_table('view', schema=None) as batch_op:
24 batch_op.drop_constraint('fk_integration_id', type_='foreignkey')
25 batch_op.drop_column('integration_id')
27 # ### end Alembic commands ###
30def downgrade():
31 # ### commands auto generated by Alembic - please adjust! ###
32 with op.batch_alter_table('view', schema=None) as batch_op:
33 batch_op.add_column(sa.Column('integration_id', sa.INTEGER(), autoincrement=False, nullable=False))
34 batch_op.create_foreign_key('fk_integration_id', 'integration', ['integration_id'], ['id'])
36 # ### end Alembic commands ###