mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-23 17:01:35 -05:00
Merge branch 'master' into async-job-stats
Conflicts: app/notifications/notifications_ses_callback.py
This commit is contained in:
39
migrations/versions/0084_add_job_stats.py
Normal file
39
migrations/versions/0084_add_job_stats.py
Normal file
@@ -0,0 +1,39 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 0084_add_job_stats
|
||||
Revises: 0083_add_perm_types_and_svc_perm
|
||||
Create Date: 2017-05-12 13:16:14.147368
|
||||
|
||||
"""
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '0084_add_job_stats'
|
||||
down_revision = '0083_add_perm_types_and_svc_perm'
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import postgresql
|
||||
|
||||
def upgrade():
|
||||
op.create_table('job_statistics',
|
||||
sa.Column('id', postgresql.UUID(as_uuid=True), nullable=False),
|
||||
sa.Column('job_id', postgresql.UUID(as_uuid=True), nullable=False),
|
||||
sa.Column('emails_sent', sa.BigInteger(), nullable=False),
|
||||
sa.Column('emails_delivered', sa.BigInteger(), nullable=False),
|
||||
sa.Column('emails_failed', sa.BigInteger(), nullable=False),
|
||||
sa.Column('sms_sent', sa.BigInteger(), nullable=False),
|
||||
sa.Column('sms_delivered', sa.BigInteger(), nullable=False),
|
||||
sa.Column('sms_failed', sa.BigInteger(), nullable=False),
|
||||
sa.Column('letters_sent', sa.BigInteger(), nullable=False),
|
||||
sa.Column('letters_failed', sa.BigInteger(), nullable=False),
|
||||
sa.Column('created_at', sa.DateTime(), nullable=True),
|
||||
sa.Column('updated_at', sa.DateTime(), nullable=True),
|
||||
sa.ForeignKeyConstraint(['job_id'], ['jobs.id'], ),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
op.create_index(op.f('ix_job_statistics_job_id'), 'job_statistics', ['job_id'], unique=True)
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_index(op.f('ix_job_statistics_job_id'), table_name='job_statistics')
|
||||
op.drop_table('job_statistics')
|
||||
Reference in New Issue
Block a user