mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-09 23:02:13 -05:00
Allow excluding services from live services count
Sometimes we have to make a few services for what really is one service, for example GOV.UK Pay and GOV.UK Pay Direct Debit. We also have our own test services which aren’t included in the count of live services. We currently count these as one service by not including them in the beta partners spreadsheet. This adds a column to mark such services as ‘not counted’, which can later be used to exclude them from reporting.
This commit is contained in:
24
migrations/versions/0282_add_count_as_live.py
Normal file
24
migrations/versions/0282_add_count_as_live.py
Normal file
@@ -0,0 +1,24 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 0282_add_count_as_live
|
||||
Revises: 0281_non_null_folder_permissions
|
||||
Create Date: 2016-10-25 17:37:27.660723
|
||||
|
||||
"""
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '0282_add_count_as_live'
|
||||
down_revision = '0281_non_null_folder_permissions'
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column('services', sa.Column('count_as_live', sa.Boolean(), nullable=False, server_default=sa.true()))
|
||||
op.add_column('services_history', sa.Column('count_as_live', sa.Boolean(), nullable=False, server_default=sa.true()))
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_column('services_history', 'count_as_live')
|
||||
op.drop_column('services', 'count_as_live')
|
||||
Reference in New Issue
Block a user