Added migration to cover what seem to be missing fields. (#676)
This commit is contained in:
parent
162d5ccb62
commit
4af871f408
30
lemur/migrations/versions/5e680529b666_.py
Normal file
30
lemur/migrations/versions/5e680529b666_.py
Normal file
@ -0,0 +1,30 @@
|
||||
"""Sync up endpoints properties
|
||||
|
||||
Revision ID: 5e680529b666
|
||||
Revises: 131ec6accff5
|
||||
Create Date: 2017-01-26 05:05:25.168125
|
||||
|
||||
"""
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '5e680529b666'
|
||||
down_revision = '131ec6accff5'
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
def upgrade():
|
||||
### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('endpoints', sa.Column('sensitive', sa.Boolean(), nullable=True))
|
||||
op.add_column('endpoints', sa.Column('source_id', sa.Integer(), nullable=True))
|
||||
op.create_foreign_key(None, 'endpoints', 'sources', ['source_id'], ['id'])
|
||||
### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_constraint(None, 'endpoints', type_='foreignkey')
|
||||
op.drop_column('endpoints', 'source_id')
|
||||
op.drop_column('endpoints', 'sensitive')
|
||||
### end Alembic commands ###
|
Loading…
Reference in New Issue
Block a user