mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-31 15:15:38 -05:00
Updates to fire text integration:
- client updated to raise errors with fire text error codes/messages New endpoint - /notifications/sms/firetext For delivery notifications to be sent to.
This commit is contained in:
31
migrations/versions/0039_more_notification_states.py
Normal file
31
migrations/versions/0039_more_notification_states.py
Normal file
@@ -0,0 +1,31 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 0039_more_notification_states
|
||||
Revises: 0038_reduce_limits
|
||||
Create Date: 2016-03-08 11:16:25.659463
|
||||
|
||||
"""
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '0039_more_notification_states'
|
||||
down_revision = '0038_reduce_limits'
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import postgresql
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.drop_column('notifications', 'status')
|
||||
op.execute('DROP TYPE notification_status_types')
|
||||
notification_status_types = sa.Enum('sent', 'delivered', 'failed', name='notification_status_types')
|
||||
notification_status_types.create(op.get_bind())
|
||||
op.add_column('notifications', sa.Column('status', notification_status_types, nullable=True))
|
||||
op.get_bind()
|
||||
op.execute("update notifications set status='delivered'")
|
||||
op.alter_column('notifications', 'status', nullable=False)
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_column('notifications', 'status')
|
||||
op.execute('DROP TYPE notification_status_types')
|
||||
Reference in New Issue
Block a user