Added dao methods needed to add or update multiple sms senders for a service.

Remove the unique constraint for service on the ServiceSmsSender model.
This commit is contained in:
Rebecca Law
2017-10-18 13:13:23 +01:00
parent 1a463cba1f
commit 4ca6fbc724
3 changed files with 200 additions and 6 deletions

View File

@@ -1,15 +1,15 @@
"""
Revision ID: 0125_remove_unique_constraint
Revises: 0124_add_free_sms_fragment_limit
Revision ID: 0126_remove_unique_constraint
Revises: 0125_add_organisation_type
Create Date: 2017-10-17 16:47:37.826333
"""
from alembic import op
import sqlalchemy as sa
revision = '0125_remove_unique_constraint'
down_revision = '0124_add_free_sms_fragment_limit'
revision = '0126_remove_unique_constraint'
down_revision = '0125_add_organisation_type'
def upgrade():
@@ -20,6 +20,5 @@ def upgrade():
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f('ix_service_sms_senders_service_id'), table_name='service_sms_senders')
op.create_index('ix_service_sms_senders_service_id', 'service_sms_senders', ['service_id'], unique=True)
# ### end Alembic commands ###