mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 17:31:14 -05:00
Not null the provider column on the inbound SMS table.
This commit is contained in:
@@ -1166,7 +1166,7 @@ class InboundSms(db.Model):
|
||||
user_number = db.Column(db.String, nullable=False) # the end user's number, that the msg was sent from
|
||||
provider_date = db.Column(db.DateTime)
|
||||
provider_reference = db.Column(db.String)
|
||||
provider = db.Column(db.String, nullable=True)
|
||||
provider = db.Column(db.String, nullable=False)
|
||||
_content = db.Column('content', db.String, nullable=False)
|
||||
|
||||
@property
|
||||
|
||||
26
migrations/versions/0093_notnull_inbound_provider.py
Normal file
26
migrations/versions/0093_notnull_inbound_provider.py
Normal file
@@ -0,0 +1,26 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 0093_notnull_inbound_provider
|
||||
Revises: 0092_populate_inbound_provider
|
||||
Create Date: 2017-06-02 16:50:11.698423
|
||||
|
||||
"""
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '0093_notnull_inbound_provider'
|
||||
down_revision = '0092_populate_inbound_provider'
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.alter_column('inbound_sms', 'provider',
|
||||
existing_type=sa.VARCHAR(),
|
||||
nullable=False)
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.alter_column('inbound_sms', 'provider',
|
||||
existing_type=sa.VARCHAR(),
|
||||
nullable=True)
|
||||
Reference in New Issue
Block a user