mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-15 01:32:20 -05:00
Add a new table to store the api information for a service inbound sms message.
Including: - url to push the inbound sms to - bearer_token to be added to the header of the request. The services will be expected to manage these properties.
This commit is contained in:
31
migrations/versions/0098_service_inbound_api.py
Normal file
31
migrations/versions/0098_service_inbound_api.py
Normal file
@@ -0,0 +1,31 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 0098_service_inbound_api
|
||||
Revises: 0097_notnull_inbound_provider
|
||||
Create Date: 2017-06-13 15:02:33.609656
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import postgresql
|
||||
|
||||
revision = '0098_service_inbound_api'
|
||||
down_revision = '0097_notnull_inbound_provider'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.create_table(
|
||||
'service_inbound_api',
|
||||
sa.Column('id', postgresql.UUID(as_uuid=True), nullable=False),
|
||||
sa.Column('service_id', postgresql.UUID(as_uuid=True), nullable=False),
|
||||
sa.Column('url', sa.String, nullable=False),
|
||||
sa.Column('bearer_token', sa.String, nullable=False),
|
||||
|
||||
sa.ForeignKeyConstraint(['service_id'], ['services.id'], ),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
op.create_index(op.f('ix_service_inbound_api_id'), 'service_inbound_api', ['service_id'], unique=False)
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_table("service_inbound_api")
|
||||
Reference in New Issue
Block a user