Remove the archived table template_statistics. The last time the table we updated was August 30 2016, it's safe to say we are done with it.

I updated the InboundSms and TemplateRedacted model to include an index in the db.
Dropped service_permissions.updated_at column since we are not auditting the table
This commit is contained in:
Rebecca Law
2017-07-10 14:43:46 +01:00
parent 2aba819cb6
commit 8a01a76e33
6 changed files with 43 additions and 43 deletions

View File

@@ -13,7 +13,6 @@ from app.dao.dao_utils import (
from app.dao.notifications_dao import get_financial_year
from app.models import (
NotificationStatistics,
TemplateStatistics,
ProviderStatistics,
VerifyCode,
ApiKey,
@@ -33,9 +32,7 @@ from app.models import (
TEMPLATE_TYPES,
JobStatistics,
SMS_TYPE,
EMAIL_TYPE,
INTERNATIONAL_SMS_TYPE,
LETTER_TYPE
EMAIL_TYPE
)
from app.service.statistics import format_monthly_template_notification_stats
from app.statsd_decorators import statsd
@@ -207,7 +204,6 @@ def delete_service_and_all_associated_db_objects(service):
_delete_commit(TemplateRedacted.query.filter(TemplateRedacted.template_id.in_(subq)))
_delete_commit(NotificationStatistics.query.filter_by(service=service))
_delete_commit(TemplateStatistics.query.filter_by(service=service))
_delete_commit(ProviderStatistics.query.filter_by(service=service))
_delete_commit(InvitedUser.query.filter_by(service=service))
_delete_commit(Permission.query.filter_by(service=service))