Script 3b0851cb25fc_add_build_to_module_relation_py
|
|
1 """Add build to module relation
2
3 Revision ID: 3b0851cb25fc
4 Revises: 7bb0c7762df0
5 Create Date: 2017-12-27 13:46:07.774167
6
7 """
8
9
10 revision = '3b0851cb25fc'
11 down_revision = '7bb0c7762df0'
12
13 from alembic import op
14 import sqlalchemy as sa
15
16
18 op.add_column('build', sa.Column('module_id', sa.Integer(), nullable=True))
19 op.create_foreign_key(None, 'build', 'module', ['module_id'], ['id'])
20
21
23 op.drop_constraint(None, 'build', type_='foreignkey')
24 op.drop_column('build', 'module_id')
25