mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-14 17:22:17 -05:00
Added missing migration file
This commit is contained in:
23
migrations/versions/0208_fix_unique_index.py
Normal file
23
migrations/versions/0208_fix_unique_index.py
Normal file
@@ -0,0 +1,23 @@
|
||||
"""
|
||||
|
||||
Revision ID: 0208_fix_unique_index
|
||||
Revises: 0207_set_callback_history_type
|
||||
Create Date: 2018-07-25 13:55:24.941794
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
|
||||
revision = '84c3b6eb16b3'
|
||||
down_revision = '0207_set_callback_history_type'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.create_unique_constraint('uix_service_callback_type', 'service_callback_api', ['service_id', 'callback_type'])
|
||||
op.drop_index('ix_service_callback_api_service_id', table_name='service_callback_api')
|
||||
op.create_index(op.f('ix_service_callback_api_service_id'), 'service_callback_api', ['service_id'], unique=False)
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_index(op.f('ix_service_callback_api_service_id'), table_name='service_callback_api')
|
||||
op.create_index('ix_service_callback_api_service_id', 'service_callback_api', ['service_id'], unique=True)
|
||||
op.drop_constraint('uix_service_callback_type', 'service_callback_api', type_='unique')
|
||||
Reference in New Issue
Block a user