mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-23 17:01:35 -05:00
Updates after review
- Modified the services_dao to return an int instead of a datetime to make usage easier and removed the BST function on year as it is not relevant for year - Improved tests do there is less logic by ordering the result so there is less reliance on the template id - Renamed variable in stats_template_usage_by_month_dao.py to make it consistent with the method
This commit is contained in:
@@ -31,20 +31,6 @@ def upgrade():
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table('notification_statistics',
|
||||
sa.Column('id', postgresql.UUID(), autoincrement=False, nullable=False),
|
||||
sa.Column('service_id', postgresql.UUID(), autoincrement=False, nullable=False),
|
||||
sa.Column('emails_requested', sa.BIGINT(), autoincrement=False, nullable=False),
|
||||
sa.Column('emails_delivered', sa.BIGINT(), autoincrement=False, nullable=False),
|
||||
sa.Column('emails_failed', sa.BIGINT(), autoincrement=False, nullable=False),
|
||||
sa.Column('sms_requested', sa.BIGINT(), autoincrement=False, nullable=False),
|
||||
sa.Column('sms_delivered', sa.BIGINT(), autoincrement=False, nullable=False),
|
||||
sa.Column('sms_failed', sa.BIGINT(), autoincrement=False, nullable=False),
|
||||
sa.Column('day', sa.DATE(), autoincrement=False, nullable=False),
|
||||
sa.ForeignKeyConstraint(['service_id'], ['services.id'], name='notification_statistics_service_id_fkey'),
|
||||
sa.PrimaryKeyConstraint('id', name='notification_statistics_pkey'),
|
||||
sa.UniqueConstraint('service_id', 'day', name='uix_service_to_day')
|
||||
)
|
||||
op.drop_index(op.f('ix_stats_template_usage_by_month_year'), table_name='stats_template_usage_by_month')
|
||||
op.drop_index(op.f('ix_stats_template_usage_by_month_template_id'), table_name='stats_template_usage_by_month')
|
||||
op.drop_index(op.f('ix_stats_template_usage_by_month_month'), table_name='stats_template_usage_by_month')
|
||||
|
||||
Reference in New Issue
Block a user