Added migration to cover what seem to be missing fields. (#676)

This commit is contained in:
Tom Lianza 2017-01-27 09:07:20 -08:00 committed by kevgliss
parent 162d5ccb62
commit 4af871f408
1 changed files with 30 additions and 0 deletions

View 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 ###