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:
Chris Hill-Scott
2019-03-25 12:21:02 +00:00
parent 34bcb806ff
commit b3008ee210
2 changed files with 25 additions and 0 deletions

View 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')