mirror of
https://github.com/GSA/notifications-api.git
synced 2026-05-05 08:40:29 -04:00
Changes following review:
- Check if right keys in new history rows - Improve model and get rid of old revision version - Add updated migration file - Test data when inserting into inbound sms history
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
Revision ID: 0311_add_inbound_sms_history
|
||||
Revises: 0310_returned_letters_table
|
||||
Create Date: 2019-12-17 11:02:17.572689
|
||||
Create Date: 2019-12-20 15:38:53.358509
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
@@ -14,7 +14,6 @@ down_revision = '0310_returned_letters_table'
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table('inbound_sms_history',
|
||||
sa.Column('id', postgresql.UUID(as_uuid=True), nullable=False),
|
||||
sa.Column('created_at', sa.DateTime(), nullable=False),
|
||||
@@ -27,11 +26,8 @@ def upgrade():
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
op.create_index(op.f('ix_inbound_sms_history_service_id'), 'inbound_sms_history', ['service_id'], unique=False)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index(op.f('ix_inbound_sms_history_service_id'), table_name='inbound_sms_history')
|
||||
op.drop_table('inbound_sms_history')
|
||||
# ### end Alembic commands ###
|
||||
|
||||
Reference in New Issue
Block a user