Files
notifications-api/migrations/versions/0282_add_count_as_live.py
Chris Hill-Scott b3008ee210 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.
2019-03-25 13:28:31 +00:00

25 lines
694 B
Python

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