mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-11 17:38:02 -04:00
Add fields to record a service’s estimated volumes
When a service go live we ask people for their estimated sending volumes. At the moment we only put this in the ticket, and store it in a spreadsheet. This means that a service can - say they want to go live - say they are sending 100,000 emails per year - not have created any email templates - still see ‘create templates’ as ‘completed’ in the go live checklist If we store this data against the service we can collect it earlier, and then use it to determine automatically what kind of templates the user needs to create before their go live checklist can be considered complete.
This commit is contained in:
30
migrations/versions/0260_service_volumes.py
Normal file
30
migrations/versions/0260_service_volumes.py
Normal file
@@ -0,0 +1,30 @@
|
||||
"""
|
||||
|
||||
Revision ID: 0260_service_volumes
|
||||
Revises: 0259_remove_service_postage
|
||||
Create Date: 2019-02-13 13:45:00.782500
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
from itertools import product
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
revision = '0260_service_volumes'
|
||||
down_revision = '0259_remove_service_postage'
|
||||
|
||||
|
||||
TABLES_AND_CHANNELS = product(
|
||||
('services', 'services_history'),
|
||||
('volume_{}'.format(channel) for channel in ('email', 'letter', 'sms')),
|
||||
)
|
||||
|
||||
|
||||
def upgrade():
|
||||
for table, channel in TABLES_AND_CHANNELS:
|
||||
op.add_column(table, sa.Column(channel, sa.String(length=255), nullable=True))
|
||||
|
||||
|
||||
def downgrade():
|
||||
for table, channel in TABLES_AND_CHANNELS:
|
||||
op.drop_column(table, channel)
|
||||
Reference in New Issue
Block a user